Jump to content

Crash on world:Clear() with Lua


Recommended Posts

as soon as i call self.world:Clear() in Lua the game crashes with the following error:

 

---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: C:\Leadwerks\Projects\DarknessAwaits\DarknessAwaits.debug.exe
File: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector
Line: 238

Expression: vector iterators incompatible

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

(Press Retry to debug the application)
---------------------------
Abbrechen   Wiederholen   Ignorieren   
---------------------------

 

self.world = World:Create() does work without any issue.

Link to comment
Share on other sites

i wanted to change level so i tried Joshs example:

inside the App.lua i have

if self.loadnewmap~=nil then
   self.world:Clear()
   --self.world = World:Create()
   Map:Load(self.loadnewmap)
   self.loadnewmap=nil
end

in the App:Loop()

 

and i then set

App.loadnewmap = self.mapFile

in my nextlevel.lua script from here http://www.leadwerks...430-next-level/

instead of loading it directly in the script

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...