07-22-2008, 04:03 AM | #1 |
Join Date: Sep 2007
Class/Position: O Gametype: CTF Affiliations: mimic- Posts Rated Helpful 0 Times
|
AddSchedule() help
Well apparently i'm the only person in the world who can't get AddSchedule to work. Everything else in the LUA script works fine, but it acts like my AddSchedules aren't even there. Is there anything i'm missing? I opened up a number of different map scripts that use them and can't find anything.
Also, here's my code: Code:
(... in a function) AddSchedule("ballreturnmessage", 1, ballreturnmessage) AddSchedule("ballreturn", 10, scheduledreturn) end function ballreturnmessage() BroadcastMessage("Ball returning in 10 seconds") end function scheduledreturn() ball:Return() ball:Restore() end Last edited by Tsukasa; 07-22-2008 at 04:37 PM. |
|
07-22-2008, 10:26 PM | #2 |
Not choking. Yet.
Lua Team
Wiki Team Fortress Forever Staff Join Date: Jul 2007
Location: Scotland
Class/Position: Demo/Def - Spy/Off Gametype: Anything but yet more fucking CTF Affiliations: FF.AvD [FF AvD/ID guild] Posts Rated Helpful 0 Times
|
The setup of the schedules in the parent function looks fine.
I'd say it's probably due to the c in 'BroadcastMessage' being lower case, and causing that scheduled function to return an error (thereby stopping the parent function at the point where that function is scheduled). Should be 'BroadCastMessage'.
__________________
Preferable to death. But only just...
Last edited by Pon; 07-22-2008 at 10:33 PM. |
|
07-23-2008, 01:10 AM | #3 |
Join Date: Sep 2007
Class/Position: O Gametype: CTF Affiliations: mimic- Posts Rated Helpful 0 Times
|
That fixed it, thanks.
|
|
07-24-2008, 05:24 AM | #4 |
Retired FF Staff
Join Date: Mar 2007
Location: The Peoples Republic of Harmfull Free Radicals.
Class/Position: Soldier, O Gametype: Doubble Mode Affiliations: Cassiotone Nation Posts Rated Helpful 1 Times
|
Broadcast is one word. Why is the C capitalized?
__________________
TG: pretty much you have no idea how much i fuckin own at this game. TG: i bested no less than three flaming tornados and broke a huge wizard. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|