LUA Problems
BlitzMax Forums/BlitzMax Programming/LUA Problems
| ||
Hi Guys I need help with the LUA Script Module. If i load a script or create a Script with SetScriptText... Import Pub.LuaScript Global LuaScr:ScriptEngine = New ScriptEngine Function Debug(ls:Byte Ptr) Local Text:String = LuaScr.CheckString(ls,1) ' Print Text End Function Local Script:String = "Print2(~qtest~q)" LuaScr.AddFunction(Debug, "Print2") LuaScr.SetScriptText(SCript, "") Local time:Int = MilliSecs() For Local i:Int = 0 Until 1000 LuaScr.SetScriptText(Script, "") LuaScr.RunScript() Next Print MilliSecs()-time LuaScr.ShutDown() I get an error before i uncomment the SetScriptText row in the Next Loop. But itīs to slow to add the Script every loop, why i cant use "one" handle with the Script and use it forever ? Thx Mfg Suco |