beo6 Posted May 25, 2013 Share Posted May 25, 2013 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 More sharing options...
AggrorJorn Posted May 25, 2013 Share Posted May 25, 2013 Can you post your code? Link to comment Share on other sites More sharing options...
beo6 Posted May 25, 2013 Author Share Posted May 25, 2013 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 More sharing options...
Admin Posted June 26, 2013 Share Posted June 26, 2013 Please post a project or self-contained code file I can run the see the result. There's a lot of different things that might be going wrong. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts