(01-16-2014, 02:26 AM)daniel0916 Wrote: it works but it is notThen change
9 8 7
it is:
1 2 3
for I=1, 10 do -- Countdown. AddSchedule(CountDown, {I}, I * 20)) -- 20 ticks is one second right? then 1 * 20 is 20 ticks is one second etc. endto
local COUNT_TO = 10 for I=COUNT_TO, 1, -1 do -- Countdown AddSchedule(CountDown, {I}, (COUNT_TO - I) * 20)) end
Quote:And it comes this error:
Code:[17:25:11] Stack trace:
[17:25:11] [C](-1): (no name)
[17:25:11] Plugins/SurvivalGames/main.lua(75): (no name)
[17:25:11] Stack trace end
[17:25:11] Error in plugin SurvivalGames calling function <callback>()
[17:25:12] LUA: Plugins/SurvivalGames/main.lua:75: attempt to index field '?' (a nil value)
The line is:
if ScheduleTable[I][3] < 0 then
When do you get the error? When it has finished counting down?