   Global data loss in lua
  Hi, I and few others are making a game in school (GameDevelopment School in sweden). We are using XNA with luainterface. The thing is that when we call the diffrent scripts the data dissappears after it's done. What we want is for the data in the luastate to be persistent, so we can use variables across scripts.What can be done?   
  Net-Ninja, what sort of variables are you keeping around? Post one of the scripts, and what data you're expecting to persist.   ;Quote:Original post by Net-NinjaHi, I and few others are making a game in school (GameDevelopment School in sweden). We are using XNA with luainterface. The thing is that when we call the diffrent scripts the data dissappears after it's done. What we want is for the data in the luastate to be persistent, so we can use variables across scripts.What can be done?I can think of two things that might cause this, either everything is 'local' or the scripts are being run in a  different lua state. Remember that Lua is totally reentrant, so if you have two different lua_State *'s, they are completely unrelated.As Sneftel says, we can't help any more than that without source.   