Results 1 to 3 of 3

Thread: script runtime error, but works

  1. #1
    Private
    Join Date
    Feb 2014
    Posts
    27
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Question script runtime error, but works

    hi, a have this situation in my console log:

    Code:
             ******* script runtime error *******
             cannot cast undefined to bool:  (file 'maps/mp/gametypes/_name.gsc', line 120)
              if(isSubStr(self.name, "^1^2"))  
     *
              started from:
                                 self waittill("menuresponse", menu, response);

    server is running ok, script seems to work, is a "name protect" for admin openscr.. commands. but every time this message appear in console log, someone can help me?

  2. #2
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Can't give you solid advice as you haven't posted any code (Read stickies before posting) but you can try placing;

    if(!isDefined(self.name)) return;

    Before

    if(isSubStr(self.name, "^1^2"))

  3. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Might be the "disconnect" response that is messing with you. After a player disconnects you'd have no player but the script has triggered the waittill.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Tags for this Thread

Posting Permissions

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