Page 1 of 1
[Solved] Script runtime error cannot cast undefined to bool
Posted: June 13th, 2009, 5:40 pm
by Pedsdude
I load my map, and as soon as I choose a team and class (i.e. when I spawn) it gives the "Script runtime error - cannot cast undefined to bool" error. Below is a screenshot of the console:
http://img193.imageshack.us/img193/2122/error2z.jpg
Here are the contents of my .gsc file:
Code: Select all
main()
{
ambientPlay("ambient_backlot_ext");
game["allies"] = "sas";
game["axis"] = "spetsnaz";
}
Not only does it happen when I spawn, but it also happens when I miss a jump (i.e. if I fall from a moderate height) - so I assume it happens due to damage (in this case fall damage).
I can't think of any reason for this whatsoever. Any help would be greatly appreciated.
Re: Script runtime error - cannot cast undefined to bool
Posted: June 13th, 2009, 5:53 pm
by waywaaaard
you forgot place this line in your .gsc
Re: Script runtime error - cannot cast undefined to bool
Posted: June 13th, 2009, 8:54 pm
by Pedsdude
I had that previously and removed it in an attempt to fix it, but still no success.
Re: Script runtime error - cannot cast undefined to bool
Posted: June 13th, 2009, 9:22 pm
by _DanTheMan_
I'm pretty sure it's the CJ mod.
If you load any map with the CJ mod, and developer mode on at the same time, it will give you an error on self.advertElem when you first spawn, and that eAttacker is undefined every time you take fall damage.
Re: Script runtime error - cannot cast undefined to bool
Posted: June 13th, 2009, 9:25 pm
by Pedsdude
Ah, so it is, thank you
I was wondering why I was still getting it even when I didn't include my .gsc file!
Won't bother with developer 1 unless it's required in future!
Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 13th, 2009, 11:32 pm
by Drofder2004
I thought I solved all the developer 1 issues :S
It is technically a simple solve, but I wont be releasing just to fix this error

Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 13th, 2009, 11:42 pm
by Pedsdude
Drofder2004 wrote:I wont be releasing just to fix this error

Rightly so, wouldn't be worth updating all the servers for the sake of something most people don't/won't encounter.
I solved (kinda) my other problem which I wanted to talk to you about, Drofder. For some reason, whenever I selected ANY brush in my map this short, translucent, black cylinder would appear in the same position on my map. The more brushes I selected, the less translucent it became, and it showed up whenever I created new brushes (but always in the same spot).
I deleted all the brushes in my map, then made a new brush and it also appeared. I solved it by selecting all the brushes etc. in my map and copying over to a new map file.
I couldn't select the cylinder at all, and none of the filters seemed to make it dissappear. It was literally a ghost. Any ideas what it was?

Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 14th, 2009, 2:17 pm
by Drofder2004
Never heard of anything like it. did you screenie it?
Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 14th, 2009, 10:37 pm
by Pedsdude
I've got the .map file if you want to have a look (assuming the ghost hasn't gone away!).
Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 14th, 2009, 10:41 pm
by Pedsdude
http://www.codjumper.com/files/ghost.map
(might wanna save target as, if you click link it just shows the text).
Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 14th, 2009, 11:18 pm
by Drofder2004
Opening in text format solves the problem...
"radius" - "200"
In worldspawn.
Re: [Solved] Script runtime error cannot cast undefined to bool
Posted: June 15th, 2009, 1:44 am
by Pedsdude
Hmm, fair does
