[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why does this cause the script to die?
- From: "Thiago Bastos" <hellraider@...>
- Date: Fri, 27 Dec 2002 18:11:42 -0200
>lua_register(luaVM, "WriteByte", l_WriteByte)
>and calling it in the script as
>WriteByte(0x453121, 15) <---made up hex
AFAIK, Lua doesn't support that numerical constant notation (0x for hexadecimal).
Your script isn't even compiling. Next time look for compilation errors.
You'll have to convert your numbers to decimal, or make your own hex2number() function receiving a string "0x453121".
Straight from the manual:
Numerical constants may be written with an optional decimal part and an optional decimal exponent. Examples of valid numerical constants are
3 3.0 3.1416 314.16e-2 0.31416E1