[ create a new paste ] login | about

Link: http://codepad.org/kzdCz2oW    [ raw code | output | fork ]

Lua, pasted on Feb 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
area = "cw"

if(area == nil)then
area = "25"
else
print(tonumber(area,16));
end

if(tonumber(area,16) >= 0xA and tonumber(area,16) <= 0xFF and area ~= nil)then
print("Right area");

else
print("Wrong area");
end


Output:
1
2
3
4
5
line 9: attempt to compare number with nil
stack traceback:
	t.lua:9: in main chunk
	[C]: ?
nil


Create a new paste based on this one


Comments: