PtokaX forum

Development Section => PtokaX Development Versions => Topic started by: PPK on 22 September, 2007, 08:39:10

Title: 0.3.6.0f
Post by: PPK on 22 September, 2007, 08:39:10
http://www.PtokaX.org/files/0.3.6.0f.7z

Quote from: Changes
Added: SetMan.Save(), RegMan.Save(), BanMan.Save().
Added: ScriptMan metatable with GetScripts, MoveUp/Down, Start/Stop/Restart script to lua.

Fixed crash when script disable scripting interface.
Fixed motd saving.
Fixed crash on script stop when timer with default function is used.
Fixed script stopping on fatal error.
Fixed crash when script was stopped on error in some cases.
Title: Re: 0.3.6.0f
Post by: Nada@WTB on 22 September, 2007, 20:15:52
it kills robocop when you upgrade to this version
Title: Re: 0.3.6.0f
Post by: Rincewind on 22 September, 2007, 21:33:28
3.6.0d and later all use the new Lua API which is incompatible with older scripts.
Title: Re: 0.3.6.0f
Post by: bastya_elvtars on 24 September, 2007, 03:00:43
Having to specify a string that represents a function name in the timer registration does not make sense to me. The second argument for TmrMan.AddTimer() should be a function type variable, not a string one.
Consider the advantages:
Code (lua) Select
TmrMan.AddTimer(911, RapeMe)

TmrMan.AddTimer(911, function() RapeMe("now") end)



Oh, and please make PXLUA not throw errors when it expects a string and gets a number, since Lua has coercion.
Title: Re: 0.3.6.0f
Post by: PPK on 24 September, 2007, 07:18:20
Quote from: bastya_elvtars on 24 September, 2007, 03:00:43
Consider the advantages:
Code (lua) Select
TmrMan.AddTimer(911, RapeMe)

TmrMan.AddTimer(911, function() RapeMe("now") end)
Yes nice advantage giving function that is not possible to call by PtokaX on timer ;D Is given on stack to AddTimer, and removed from stack after this function returns .. afaik here is no way to call this function on timer interval.
Quote from: bastya_elvtars on 24 September, 2007, 03:00:43
Oh, and please make PXLUA not throw errors when it expects a string and gets a number, since Lua has coercion.
Lua has, but only for numbers. When it will have it for all types then yes, but for now is easyer to have it same for all types and not for one yes and for other no.