Jump to content
tipforeveryone

[SOLVED] Debugger Error when GetPosition

Recommended Posts

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

post-16833-0-07207100-1455335138_thumb.png

post-16833-0-38286700-1455335157_thumb.png

Share this post


Link to post

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 smile.png 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!

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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. rolleyes.gif that will teach me to stay up past my bedtime.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...