tipforeveryone Posted February 13, 2016 Share Posted February 13, 2016 Something goes wrong here after update I created 2 boxes (Box1 and Box2) then attached Test.lua file to Box1 Run in Debug mode and got this error Some of my scripts file do not work anymore when using a same script as Test.lua I tested on 2 platforms (Linux and Windows) and it has same error, even in new Project Please help Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 is there a camera in that scene or in the main program? Would be best if you provided an example that others could test. 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...
tipforeveryone Posted February 13, 2016 Author Share Posted February 13, 2016 is there a camera in that scene or in the main program? Would be best if you provided an example that others could test. It is the camera from defaut Editor, even I use FPSController prefab its Camera. It still brings me error So that I think problem came from Debugger itself. In this case I can not use self.entityVariable:GetPosition() anymore. All scripts which use GetPosition does not work too. Most of my script broken : )) what a pain! Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 Has something to do with GetPosition() and using it within the function Script:UpdateWorld(). It works fine when used in the function Script:Start(). Also problem occurs with the release not just debugger. Only suggestion is to opt out of the beta at the moment and use an archive or the default. 2 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...
tipforeveryone Posted February 13, 2016 Author Share Posted February 13, 2016 Has something to do with GetPosition() and using it within the function Script:UpdateWorld(). It works fine when used in the function Script:Start(). True, this kills my feeling in game making effort. I still in love with leadwerks, hope it will be fixed soon... Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted February 13, 2016 Author Share Posted February 13, 2016 Is there any solution for this problem ? I need that UpdateWorld and GetPosition work.. Quote Link to comment Share on other sites More sharing options...
Haydenmango Posted February 13, 2016 Share Posted February 13, 2016 Does your game crash immediately when GetPosition() is called or does it happen after some time? I am curious because I am using GetPosition() in my UpdateWorld() function and my game doesn't crash immediately but I have been getting inconsistent crashes when playing my game lately. Anyhow, I switched back to the 2015-12 build of leadwerks to see if I still get inconsistent crashes and I need to do more testing to see if switching the build makes any difference in my case. Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding Link to comment Share on other sites More sharing options...
tipforeveryone Posted February 13, 2016 Author Share Posted February 13, 2016 Does your game crash immediately when GetPosition() is called or does it happen after some time? I am curious because I am using GetPosition() in my UpdateWorld() function and my game doesn't crash immediately but I have been getting inconsistent crashes when playing my game lately. Anyhow, I switched back to the 2015-12 build of leadwerks to see if I still get inconsistent crashes and I need to do more testing to see if switching the build makes any difference in my case. This happened after I updated my project. It crashes when I use GetPosition() or even Instance() in UpdateWorld(). Strange.. Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted February 13, 2016 Author Share Posted February 13, 2016 I think the problem is about Script.VariableName = "" --entity Label I try this and it returns no error local somevar = self.entity:GetPosition() but not local somevar = self.VariableName:GetPosition() So that maybe something wrong in --entity ... I just don't know how to fix this Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 hehe... brain fart on my part. My box2 when I recreated your scene above does not have mass or a script, so it is getting collapsed into the scene at runtime. So yes this is crashing because box2 no longer exists at runtime. that will teach me to stay up past my bedtime. 1 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...
tipforeveryone Posted February 13, 2016 Author Share Posted February 13, 2016 Yes, everything works fine when I attach an empty script to my "Box2", there is no more error. Thank you Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 It would probably help new people if this information about CSG brushes was officially posted some where in the documentation or tutorials. Right now the issue with CSG brushes being collapsed and no longer individual entities which requires a mass or an empty script added to enable any interaction with the individual brush is being done by word of mouth. An official statement in the CSG tutorial about what happens at runtime and the need for mass/scripts should be spelled out in BIG FLASHING letters. This was not the first time this has got someone and it definitely will not be the last. 3 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 February 13, 2016 Share Posted February 13, 2016 I really think we need a checkbox in the properties tab for csg to collapse it or not. The mass/script just isn't intuitive I think. 3 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.