-snip snap-
/facepalm
[LUA]
if tonumber(args[1]) < 1 then return end
[/LUA]
im so retarded
You might want to check that tonumber is non-nil as well, in case the first argument isn't in a number format. ie
[lua]
local argnum = tonumber(args[1])
if (not argnum) or (argnum < 1) then return end
[/lua]
Assuming from the args[1] that it's a console command you're writing.
[QUOTE=MegaJohnny;27869309]You might want to check that tonumber is non-nil as well, in case the first argument isn't in a number format. ie
[lua]
local argnum = tonumber(args[1])
if (not argnum) or (argnum < 1) then return end
[/lua]
Assuming from the args[1] that it's a console command you're writing.[/QUOTE]
i already figured it out :3
Sorry, you need to Log In to post a reply to this thread.