Jump to content

LoadTexture in editor then drawing it crashes editor


Rick
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

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

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...