Guest Red Ocktober Posted May 13, 2010 Share Posted May 13, 2010 i'm trying to add a new scriptable object in the sandbox editor... i can add the model to the scene ok, but when i open the script editor and add the following code... require("scripts/class") local class=CreateClass(...) and try to run it... i get a "table index is nil" error... can an editor/lua wiz please explain what i'm doing wrong here... boy this lua thing is fast becoming a humbling experience for me... all i'm trying to initially do is get a property sheet to come up when i double click an object in the sandbox... THANKS --Mike Quote Link to comment Share on other sites More sharing options...
Rick Posted May 13, 2010 Share Posted May 13, 2010 Short answer and the quickest way would be to just copy the Scripts\template.lua and uncomment things in that file for your objects. I always start with that as it's easier. I agree though, when I was getting into LUA the implementation didn't seem all that straight forward. This is why I'm messing around with C# script instead. I'm trying to convince Josh that C# script would be better. It provides much better object oriented support and the syntax is pretty close to LUA. The only down side would be the .NET dependency. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted May 13, 2010 Share Posted May 13, 2010 i'm trying to add a new scriptable object in the sandbox editor... i can add the model to the scene ok, but when i open the script editor and add the following code... require("scripts/class") local class=CreateClass(...) and try to run it... i get a "table index is nil" error... can an editor/lua wiz please explain what i'm doing wrong here... boy this lua thing is fast becoming a humbling experience for me... all i'm trying to initially do is get a property sheet to come up when i double click an object in the sandbox... THANKS --Mike Don't run it. Just save it. you may have to exit the editor and reload for it to come up for that entity. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Marleys Ghost Posted May 13, 2010 Share Posted May 13, 2010 I should add I am still using 2.31 as there seems to be far too many issues with 2.32 Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted May 13, 2010 Share Posted May 13, 2010 yeah, trying to run it right away is what was raising the error... you saved me again... thx... i wasted over an hour f'in' around with this thing... I should add I am still using 2.31 as there seems to be far too many issues with 2.32 i've got multiple installs... about 16 of em right now... only a few are usable... and only 2 BlitzMax installs for 231 and 232beta respectively... it's becoming a real mess --Mike 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.