Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: AssertMsg

  1. #11
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by serthy View Post
    fires script error:

    assert( false );
    assertEx( false , "ERROR" );
    assertMsg( true , "ERROR" );

    everything OK:

    assert( true );
    assertEx( true , "ERROR" );
    assertMsg( false , "ERROR" );
    AssertMsg() only has 1 argument. Not 2. Only AssertEx() has 2 arguments.
    Last edited by Tally; 17th October 2013 at 22:16.

  2. #12
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    Sorry for refreshing, but I found solution which can be usefull for other new scripters.

    You have to have "developer_script" cvar set to 1 if you want to use assert , assertMSG or assertEx.
    Last edited by RobsoN; 2nd December 2013 at 23:12.
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  3. The Following 3 Users Say Thank You to RobsoN For This Useful Post:

    kung foo man (2nd December 2013),Lonsofore (8th January 2019),serthy (3rd December 2013)

  4. #13
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by RobsoN View Post
    Sorry for refreshing, but I found solution which can be usefull for other new scripters.

    You have to have "developer_script" cvar set to 1 if you want to use assert , assertMSG or assertEx.
    Yes, they are all in the "debug" section of the script documentation. All debug items are developer functions, and as such, need to have developer_script enabled. I thought every one knew that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •