Fix "Event system cannot take large numbers" #1277707. Lua's default number type is double, not ints - and any number over 999999 was getting converted into 0.