Second odd issue relating to out-of-date files
by Aaron Chapin · in Torque Game Builder · 09/21/2011 (5:24 pm) · 1 replies
I was recently working on a code file, and kept seeing a particular echo statement printed twice, when it should have only been printed once. Furthermore, one of the locations referenced did not reflect the current location in the script. Furthermore, there were issues being caused later on in the script, seemingly attempting to call methods on the debug message (and failing, because a string doesn't have getPositionX()). So, I changed the text of that echo message. In the debug log, the incorrect listing stayed incorrect, but the correct one did. I removed the statement, and the correct message disappeared from the log. I changed the name of the function, and it worked as intended. It seemed like for some reason, an older version of the script was being merged with the newer version at run-time. Is this a possibility? If not, does anyone have an idea as to why it could have happened? I had a seemingly similar issue with image files a few days ago, where the new resolution of an image wasn't being seen by the editor. Is there something about TGB's caching that I should be aware of? Thanks!
Torque Owner Nic Biondi
Default Studio Name
I've never seen any runtime merging of different versions of scripts. I think there's something going on, but I doubt it's related to any script merging.
Regarding images, you have to restart the TGB editor to see changes in your images since it seems to cache them once you import the image into a datablock.
Regarding debugging. I've heard that the debugger console doesn't remove logs sometimes so if you don't scroll down all the way you can get the idea that your ouput isn't changing when it is.
Also, when I have had a problem where a change does not show up, I have found 9/10 times it's because there is an error in the script somewhere which I didn't realize so it keeps using the old script even though I think it should be using the changes I just made. I would suggest you get a copy of Torsion, it makes these kinds of errors much easier to find.
Cheers friend and good luck with your project!!
-nic