Creating Global Accessable variables in Lua
I am developing a C++ game with uses Lua for it''s scripting. However, in all my scripts I need some variables to be the same to keep the scripts easy. For instance, I want to define a global NewLine variable containing \r\n. I tried to do this in my OnGameStart script function but it doesn''t seem to work.
Toolmaker
-Earth is 98% full. Please delete anybody you can.
Actually, I want to do it from within my code. I tried pushing 2 values onto the stack, but that didn't quite work. So I am confused now.... Any ideas?
-Earth is 98% full. Please delete anybody you can.
[edited by - toolmaker on September 1, 2003 8:20:56 PM]
-Earth is 98% full. Please delete anybody you can.
[edited by - toolmaker on September 1, 2003 8:20:56 PM]
Just out of curiosity, have you tried tolua? It''s the automatic binding utility I use for my game, and it makes exposing extern''ed global variables in the host program to script pretty simple.
Josh
vertexnormal AT linuxmail DOT org
Check out Golem at:
My cheapass website
Josh
vertexnormal AT linuxmail DOT org
Check out Golem at:
My cheapass website
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement