01-16-2014, 01:11 AM
(This post was last modified: 01-16-2014, 01:34 AM by daniel0916.)
(01-16-2014, 12:49 AM)xoft Wrote: You might want to consider the Forgetful storage schema, settable in world.ini. It will cause the server to load chunks from the MCA files, but not save them anywhere, so as soon as the chunks are unloaded (all players log out or move too far away) the chunks seemingly regenerate back to their previous state.
http://wiki.mc-server.org/doku.php?id=co...ge_section
Thanks i will try it .
The Schedule with onTick or onWorldTick don't work.
function AddSchedule(Function, Parameters, Ticks) table.insert(ScheduleTable, {Function, Parameters, Ticks}) end function OnScheduleTick(Time) for I=1, #ScheduleTable do if ScheduleTable[I][4] < 0 then ScheduleTable[I][2](ScheduleTable[I][3]) table.remove(ScheduleTable, I) else ScheduleTable[I][4] = ScheduleTable[I][4] - 1 end end end
cPluginManager.AddHook(cPluginManager.HOOK_TICK, OnScheduleTick);
AddSchedule(MyFunction, {}, 200);
function MyFunction(Params) cRoot:Get():BroadcastChat("Schedule!"); end
Code:
[16:12:40] Stack trace:
[16:12:40] [C](-1): (no name)
[16:12:40] Plugins/SurvivalGames/main.lua(75): (no name)
[16:12:40] Stack trace end
[16:12:40] Error in plugin SurvivalGames calling function <callback>()
[16:12:40] LUA: Plugins/SurvivalGames/main.lua:75: attempt to compare nil with number
In the line is:
if ScheduleTable[I][4] < 0 then