Jump to content

How do I fix this error when switching maps?


cowlol
 Share

Recommended Posts

Hey guys,

 

So Piller helped me making a script to load a new map when entering an object in game, with collision type ''trigger''. In App.lua you can see some changes in the App.lua script, and if you go to assets > scripts > objects > triggers > LoadLevel.lua you see the second part in order to load new maps. Now as far as I know I have done exactly what Piller's video described to me what I should do but I get this error when entering the trigger object:

 

Program:

...ents\Leadwerks\Projects\buildandshoot\buildandshoot.debug.exe

File: c:\program files (x86)\microsoft visual studio

12.0\vc\include\vector

Line: 1442

 

Expression: vector erase iterator outside range

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

 

(Press Retry to debug the application)

 

Here is Piller's video:

http://www.youtube.com/watch?v=FBFNbZxoAC8

 

Is there anything wrong in my part of the scripts, or is there something wrong with my pc settings?

 

The project file can be downloaded here too. If you load the project on start.map you will see a wooden block in front of the place where you spaw: this is the trigger to go to lol.map. In lol.map there is also a wooden block functioning as trigger. You can change to which map the object refers, by selecting the object, going to scene and then object scripts, and there you should be able to change it.

 

Hopefully you guys can solve my issues!

Link to comment
Share on other sites

And that map exists in your maps folder for the current project you are in? Can you load that map in the editor and it doesn't give and error itself?

 

lol.map exists in C:\Users\********\Documents\Leadwerks\Projects\buildandshoot\Maps

so it is in the right folder yes. In the editor itself it does not give an error, no. I can also launch both maps perfectly fine, but as soon as I step into the trigger on start.map it gives the error. When I step into the trigger on lol.map my screen starts shaking and it gives a diffrent error: failed to read file ''C:\Users\********\Documents\Leadwerks\Projects\buildandshoot''

Link to comment
Share on other sites

with 2 new clean maps (i imported all the scripts from other project though) it just gives this error:

failed to read file ''C:\Users\********\Documents\Leadwerks\Projects\buildandshoot'' so it doesn't work on that either :/

 

I do use the assets > models > characters > generic.mdl as first person controller. Next to that I have also implemented your teleportation script.

 

the teleport blocks are at physics > collision type = trigger so that should be allright as well.

 

I'm gonna take a nap now, I've been awake way too long today already ;)

 

I'll check the forums and all when I wake up again.

Thanks for your help!

Link to comment
Share on other sites

ok. Btw, I do use leadwerks in Beta stage ( so i get all the updates early). I added maps to this message. Those are the ones without files from outside leadwerks (2 basic testmaps). (change .lua to .map, i can't upload .map since im not permitted)

 

the other (primairy) maps, on which I at first created the scripts were too big to upload here.

 

but I'm gonna sleep now, see you in perhaps about 8 hours. And once again, thx for your help :)

lol.lua

start.lua

Link to comment
Share on other sites

Those work for me so not really sure what the deal could be. Take the entire project folder and zip it up and make a post in the Bugs forum and attach it for Josh to see what's up.

 

one small problem though: the project is 500mb. I can upload a maximum of 0.5 kb to those forums.

Link to comment
Share on other sites

  • 4 weeks later...

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