[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: toLua 5 errors/questions
- From: Ariel Manzur <listas@...>
- Date: Sun, 07 Sep 2003 10:01:31 -0300
At 11:05 07/09/2003 +0200, you wrote:
Hi,
hi.
1. I have these definitions inside my package file:
class gsGlobals {
...
const int activate_extra_bar;
const int activate_extra_bar @ extra_bar;
...
};
tolua_variable(tolua_S,"activate_extra_bar", \
tolua_get_gsGlobals_activate_extra_bar,NULL);
tolua_variable(tolua_S,"extra_bar", \
tolua_get_gsGlobals_activate_extra_bar,NULL);
[...]
Or has there something in the .pkg syntax changed from toLua 4
to the new version? toLua 4 worked perfectly.
What were the names of the functions that tolua4 generated?
2. This seems to be a very strange problem. Well, it worked with
[...]
if player[1] == player[2] then this_never_happens() end
I didn't follow the whole explanation, but you should know that
operator==() was not supported on tolua4, but it is on tolua5, so maybe
that's one thing that may be happening differently.
But if player[2] dies, my program just exits without shouting
errors to stderr or somewhere else. Even my debugger says the
program ended correctly, but with errorlevel 1.
[...]
3. How do I find out where an error ocurred when I get a message like:
"Invalid type in variable assignment"? The tolua_Error struct which
is passed only contains an array index and a string containing
"number".
Try using lua_pcall instead of lua_call, that way you can use
debug.traceback() to see the error message and a traceback.
good luck..
Ariel.
Ariel.
http://Anime.com.ar
snm