Page 1 of 1

Scripting error!

Posted: Mon Sep 14, 2009 7:02 pm
by dude77
HELP ME!!!! PLEASE!!!
i made a small map and got 1 allied soldier to follow me, when i go into a room with a german in it it freezes and quits me out from the game and on the console it says this:

~~script error: cannot cast 'NIL' to float
wait self.waittime (global/friendly.scr, 1172)

~~script error: cannot cast 'NIL' to float
while (isalive self) (global/friendly.scr, 228)

***********************************
ERROR: Command Overflow. Possible infinite loop in thread.
***********************************
----- server shutdown -----
==== shutdown game ====

-----------------------------------



any help Sad

Posted: Tue Sep 15, 2009 12:55 am
by 211476
please next time, stick it to you last thread, and don't use all those exclamation points

Posted: Tue Sep 15, 2009 8:28 am
by Rookie One.pl
Post your script. And also don't use so many exclamation marks, it hurts the eyes. I removed the excessive ones for you.

Posted: Tue Sep 15, 2009 7:06 pm
by dude77
sorry about that, its because i havent had a reply in a while and its bugging me that it wont work!
script:

exec global/auto.scr

level waittill prespawn
level waittill spawn

main:

thread FriendInit

end

FriendInit:


level.friendly1.targetname = friend1
level.friendly2.targetname = friend2
level.friendly3.targetname = friend3

$friend1.destination = $player
$friend2.destination = $player
$friend3.destination = $player

$friend1.friendtype = 1
$friend2.friendtype = 1
$friend3.friendtype = 1

$friend1.distance = 175
$friend2.distance = 225
$friend3.distance = 250

$friend1 thread global/friendly.scr::friendlythink
$friend2 thread global/friendly.scr::friendlythink
$friend3 thread global/friendly.scr::friendlythink

end

thanks

:)

Posted: Thu Sep 17, 2009 4:08 pm
by jv_map
You need a call 'exec global/friendly.scr', I think just below level waittill prespawn.

Posted: Thu Sep 17, 2009 4:43 pm
by Smithy
I think exec global/auto.scr includes that. I could be wrong though.


EDIT:

Yeah it does.
main local.script:

if ( level.auto_script_run == 1 )
{
end
}

if ( local.script != NIL )
{
if ( level.script == NIL )
{
level.script = ("maps/" + local.script + ".scr")
}
}

exec global/loadout.scr
exec global/ai.scr
exec global/exploder.scr
exec global/turret.scr

level waittill prespawn

exec global/door_locked.scr
exec global/friendly.scr
exec global/ambient.scr local.script
exec global/bomber.scr

level.auto_script_run = 1

level waittill spawn

dude77, look on your other thread and look at my post, it may help.

Posted: Fri Sep 18, 2009 7:56 pm
by dude77
no luck :(