• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Checking if an storage is numeric

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,766
Solutions
1
Reaction score
225
Location
Chile, Santiago
Hey, I need something, a function that check if the storage is a number (in some cases they are strings, don't know why), any one knows?
 
Lua:
local x = getCreatureStorage(cid, 1000) -- this can be anything like globalstorage etc
	if isNumber(x) then
		print(x..'is a number!')
	else
		print(x..'is not a number!')
	end

or
Lua:
local x = getCreatureStorage(cid, 1000) -- this can be anything like globalstorage etc
	if tonumber(x) then
		print(x..'is a number!')
	else
		print(x..'is not a number!')
	end
same thing
 
Last edited:
Back
Top