Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Suggestion: informative console log

dekon_17
Registered User
Quote
2023-12-28 20:27:32

I had this issue many times. When I get "Could not get property" or similar error in engine console while playtesting my game, everything works fine, but the error still appears. The big problem with this that I see is that it doesn't tell you in which script in which line this error occurs. And, well, searching for such errors and their causes is quite hard sometimes.

Over all, I believe it would be a good and a simple addition to the engine, making development process and debugging easier.


just_in_case
Moderator
Quote
2024-01-04 07:02:23

Yeah, it won't because many of the inbuilt functions needs to be updated manually for having debug console errors, it will only give you the line number and script if there is an actual javascript error, and not missing properties for CopperCube objects.

and it's totally unnecessary because it won't be an error actually in the code, but can be a runtime issue.

For example lets say you are checking properties of an object with the name "cubemesh", but during runtime you deleted that object or changed it's name. The debug console is going to throw an output that the "Could not get property" or "the provided scenenode doesn't exist."

While the actual code is just fine, but the game components were changed during runtime.

yeah, we can update the debug errors so that it can output the name of the node, on which the command is executing so that you can get to know which node is throwing that output instead of the line number because the line number in that case is not necessary. It can throw that output even in those cases when your code is just fine.

So if everything is working fine, and you are seeing that error, just ignore it. Unless it is breaking the whole game or behavior and action for you.

Sometimes when using 2D overlays they get auto-removed from the behavior and action properties, so dual-check your behaviors or actions that deal with 2D overlays.


Robbo
Guest
Quote
2024-01-08 01:46:32

I also have had these problems many times over - ie insufficient info for some error messages.

I have gone though almost all CoppereCube API and added more debug messages plus the name of the API and the name of the object in question using this C++ code:

core::stringc str = "ccbSetSolidEmissive: range must be 0-1 for ";
str += node->getName();
scriptEngine->getIrrlichtDevice()->getLogger()->log(str.c_str());


This will show you what object name is having an issue (if it exists) and the API used causing the error - its not line number but helps a lot...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact