Rick Posted October 10, 2011 Share Posted October 10, 2011 In the game Lua script from the editor when I try to draw an image that I just put the LoadTexture function in for the first time it crashes on me. After the restart everything works fine. Anyone else have this issue? I wouldn't think it would require a restart of the editor since the code is loading the texture, but it almost seems like if that texture wasn't loaded by the editor on startup or something it crashes. If you are curious on how to repeat this: 1) Load editor 2) Bring up game script and put in a LoadTexture and assign it to a variable 3) Put a DrawImage() on that variable somewhere in the game script 4) Run the editor 5)??? 6) Crash That's how it works for me anyway. Not a huge issue but just annoying and wondering if I have to live with it or if there is something I'm doing wrong. Leadwerks Engine 2.43 Quote Link to comment Share on other sites More sharing options...
macklebee Posted October 10, 2011 Share Posted October 10, 2011 doesn't happen to me... and i use loaded textures all the time in game scripts and object scripts... without seeing your code i would just assume you are doing something wrong... 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...
Rick Posted October 10, 2011 Author Share Posted October 10, 2011 The problem is there isn't much to the code. It is literally LoadTexture(), basic game loop with a DrawTexture() in it. Do you use an external editor for your Lua code? I'm using notepad++ when I edit all my Lua so not sure if that would have anything to do with it. I guess I don't even know how to open the main game script from the editor. If it's not the external editor I'll make a video showing it. I'm able to reproduce it. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 10, 2011 Share Posted October 10, 2011 My guess would be a problem with the texture file. 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 October 10, 2011 Share Posted October 10, 2011 nah, i never needed anything but the included Script Editor... but to open the scene Editor's script editor, just click on the script icon in the toolbar on the right side... then just open the game script that you are using from there and press the Run button... 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...
Rick Posted October 10, 2011 Author Share Posted October 10, 2011 My guess would be a problem with the texture file. I would have thought so also, but when I reopen the editor and just run the code again it works, which is the part that confuses me. I'll make a video sometime about this. Since a reopen works it's not the end of the world for me just interrupts the flow is all. @macklebee, ah thanks. I clicked that scrip icon and it was blank. I noticed it had the menu options to navigate, just thought there was a way to directly open the script that was configured as the game script, but that's easy enough too. Quote Link to comment Share on other sites More sharing options...
macklebee Posted October 10, 2011 Share Posted October 10, 2011 well you can set the gamescript that you are using as the default in the Tools>Options>Paths dialog... and then when you press the gamepad icon in the scene Editor it will run that game script... 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...
Rick Posted October 10, 2011 Author Share Posted October 10, 2011 Yeah I set that. I just thought once that was set the script toolbar icon would open that script if I didn't have any models selected, but it was blank to my surprise. I saw the file menu and figured I could probably navigate to the file but thought there might have been another way to directly go to the set game script with 1 button click. Thanks. 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.