L B Posted September 8, 2010 Share Posted September 8, 2010 I'm getting the following error in my log: Loading model "c:/program files/aerora/environment/waterplane/environment_waterplane.gmf"... Loading mesh "c:/program files/aerora/environment/waterplane/environment_waterplane.gmf"... Loading script "c:/program files/aerora/environment/waterplane/environment_waterplane.lua"... Creating class environment_waterplane Warning: Failed to save body "c:/program files/aerora/environment/waterplane/environment_waterplane.phy". Lua error: [string "c:/program files/aerora/environment/waterpl..."]:34: C:/Program Files/BlitzMax/mod/lugi.mod/core.mod/lgcore.cpp:891@lugi_index_object: Index for object is not a valid field or method. Lua error: [string "c:/program files/aerora/environment/waterpl..."]:34: C:/Program Files/BlitzMax/mod/lugi.mod/core.mod/lgcore.cpp:891@lugi_index_object: Index for object is not a valid field or method. Lua error: [string "c:/program files/aerora/environment/waterpl..."]:34: C:/Program Files/BlitzMax/mod/lugi.mod/core.mod/lgcore.cpp:891@lugi_index_object: Index for object is not a valid field or method. Loading model "c:/program files/aerora/environment/atmosphere/environment_atmosphere.gmf"... Loading mesh "c:/program files/aerora/environment/atmosphere/environment_atmosphere.gmf"... Loading script "c:/program files/aerora/environment/atmosphere/environment_atmosphere.lua"... Creating class environment_atmosphere Lua error: [string "c:/program files/aerora/environment/atmosph..."]:69: C:/Program Files/BlitzMax/mod/lugi.mod/core.mod/lgcore.cpp:891@lugi_index_object: Index for object is not a valid field or method. Lua error: [string "c:/program files/aerora/environment/atmosph..."]:69: C:/Program Files/BlitzMax/mod/lugi.mod/core.mod/lgcore.cpp:891@lugi_index_object: Index for object is not a valid field or method. Lua error: [string "c:/program files/aerora/environment/waterpl..."]:34: C:/Program Files/BlitzMax/mod/lugi.mod/core.mod/lgcore.cpp:891@lugi_index_object: Index for object is not a valid field or method. Any idea at all? I'm lost at the moment. Quote Link to comment Share on other sites More sharing options...
macklebee Posted September 8, 2010 Share Posted September 8, 2010 Its telling you exactly where the problem is... line 34 of the waterplane script and line 69 of the atmosphere script. It doesn't recognize the "fw.renderer.SetWater(1)" and "fw.renderer.BackgroundMode(1)". Do you have those commands available in C# or have you changed these to some derivation so it doesn't recognize them? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Josh Posted September 8, 2010 Share Posted September 8, 2010 Looks like you didn't set the global fw object. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
macklebee Posted September 8, 2010 Share Posted September 8, 2010 no he must have or it would have never gotten to those lines in the script since it checks for fw~=nil... that was what i thought as first as well, but I couldn't get the same errors to occur when I tried it. It only happened when I changed those commands to something that wasn't in my lua glue functions... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
L B Posted September 8, 2010 Author Share Posted September 8, 2010 Here's the inner header code for initializing framework: Framework.Pointer = Core.CreateFramework(); Framework.CheckPointerDll(); Framework.StatisticMode = StatisticMode.None; //Global.Objects["fw"] = Framework.Pointer; I had this commented out, because it didn't make any change. IntPtr lua = Core.GetLuaState(); Core.lua_pushobject(lua, Framework.Pointer); Core.lua_setglobal(lua, "fw"); Core.lua_pop(lua, 1); Oh yeah, the global goes as follows: public class GlobalPointers { internal GlobalPointers() { } public IntPtr this[string key] { get { return Core.GetGlobalObject(key); } set { Core.SetGlobalObject(key, value); // There. } } } Quote Link to comment Share on other sites More sharing options...
L B Posted September 8, 2010 Author Share Posted September 8, 2010 Seems to be coming from Tyler's custom DLL, but I can't verify as he's never on. Works fine with the old ones. Quote Link to comment Share on other sites More sharing options...
Laurens Posted September 8, 2010 Share Posted September 8, 2010 When all else fails: http://www.red-gate.com/products/reflector/. Works great for .NET programming exams that supply an example assembly as well Quote Link to comment Share on other sites More sharing options...
L B Posted September 8, 2010 Author Share Posted September 8, 2010 I have this at home, only I doubt it reflects the BlitzMax engine.dll. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.