Problem with dividing

What am I doing wrong?

local a=1/2; server.log("a="+a);

Result:
25. Januar 2013 13:14:48 MEZ: a=0

try this

local a = 1.0/2.0;

I don’t know if or where it is documented but the 1 and 2 are being treated as integers and then the precision is being dropped, not rounded. 0.5 is just 0

Ah OK, thanks.