tcmodder Posted February 25, 2010 Share Posted February 25, 2010 OK i have a menu system for lua script but i cant get it to run its giving me error after error???? red = Color.new(255,0,0) black = Color.new(0,0,0) white = Color.new(255,255,255) menustatus = 1 while true do screen:clear(black) pad = Controls.read() if pad:up() then menustatus = menustatus - 1 screen.waitVblankStart(4) end if pad:down() then menustatus = menustatus + 1 screen.waitVblankStart(4) end color={white, white, white} screen:print(50, 50, "Play", color[1]) screen:print(50,60,"Options", color[2]) screen:print(50,70,"Exit", color[3]) color[menustatus]=red if menustatus == 1 then if pad:cross() then --insert game code here end end if menustatus == 2 then if pad:cross() then --insert options here end end if menustatus == 3 then if pad:cross() then break end end if menustatus <= 0 then menustatus = 3 end if menustatus => 4 then menustatus = 1 end screen.flip() screen.waitVblankStart() end Quote Link to comment Share on other sites More sharing options...
Rick Posted February 25, 2010 Share Posted February 25, 2010 Where did you get this script? It doesn't even look like any LE comamnds. Quote Link to comment Share on other sites More sharing options...
tcmodder Posted February 25, 2010 Author Share Posted February 25, 2010 Well i was having problems with my script so i looked around for one that I could learn off of http://forums.qj.net/psp-development-forum/63115-lua-scripts-examples-snippets.html Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 The Q is where did you get this code? 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...
VicToMeyeZR Posted February 25, 2010 Share Posted February 25, 2010 whats the error? For one if menustatus => 4 then Thats backwards. Should be >= 2. Color isn't a valid class from this code, so it will never set. Quote AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 from a discussion in the PSP Development Forum ? 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...
tcmodder Posted February 25, 2010 Author Share Posted February 25, 2010 ????i thought it was a lua script.You mean thats for a psp.Grr well i guess ill keep looking for something i can learn from. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 yeah I see now ... and you thought it would be plug and play ? 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...
tcmodder Posted February 25, 2010 Author Share Posted February 25, 2010 yeah I see now ... and you thought it would be plug and play ? Well i tried creating my own menu but i failed realy bad.I can code in c# but im not sure how to place the codes to work with leadwerks and things. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 You mean thats for a psp Well it was on the PSP Development Forum .... 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...
Rick Posted February 25, 2010 Share Posted February 25, 2010 lua is a scripting language that allows you to basically create your own library with it. So each engines implementation of the functions they created in lua to use in lua will be different. 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.