Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 07-22-2008, 04:03 AM   #1
Tsukasa
 
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
Any ideas?

Last edited by Tsukasa; 07-22-2008 at 04:37 PM.
Tsukasa is offline   Reply With Quote


Old 07-22-2008, 10:26 PM   #2
Pon
Not choking. Yet.
Lua Team
Wiki Team
Fortress Forever Staff
 
Pon's Avatar
 
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'.
__________________
Support FF:

YOU GUYS REALLY SHOULD UPDATE YOUR STAFF LIST!
I haven't posted since 2010...

Preferable to death. But only just...

Last edited by Pon; 07-22-2008 at 10:33 PM.
Pon is offline   Reply With Quote


Old 07-23-2008, 01:10 AM   #3
Tsukasa
 
Join Date: Sep 2007
Class/Position: O
Gametype: CTF
Affiliations: mimic-
Posts Rated Helpful 0 Times
That fixed it, thanks.
Tsukasa is offline   Reply With Quote


Old 07-24-2008, 05:24 AM   #4
Nezumi
Retired FF Staff
 
Nezumi's Avatar
 
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.
Nezumi is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.