Patching for sourcRect and telnetDebugger still causing problems.
by Andy Hawkins · in Torque Game Builder · 12/03/2011 (5:07 am) · 13 replies
I've run this patch
www.garagegames.com/community/forums/viewthread/126360
The problems continue :(
When I rebuild TGB it no longer called onAddToScene in behaviors.
To fix this I'm using # define TORQUE_TOOLS in a release build. Is this okay? It fixes that problem.
Anyway when I do this and I tried to debug using Torsion using this fresh and delicious .exe I now get this error in Torsion.
"torsion_precompile.tmp (20): Unable to find function setModPaths"
www.garagegames.com/community/forums/viewthread/126360
The problems continue :(
When I rebuild TGB it no longer called onAddToScene in behaviors.
To fix this I'm using # define TORQUE_TOOLS in a release build. Is this okay? It fixes that problem.
Anyway when I do this and I tried to debug using Torsion using this fresh and delicious .exe I now get this error in Torsion.
"torsion_precompile.tmp (20): Unable to find function setModPaths"
#2
torsion_precompile.tmp (20): Unable to find function setModPaths
12/03/2011 (8:55 am)
Just finished doing what you suggested. Same error...torsion_precompile.tmp (20): Unable to find function setModPaths
#3
main.cs (25): Unable to find function getModPaths
main.cs (25): Unable to find function setModPaths
The game runs, but back to square one - the onAddToScene doesn't run.
I suspect setting #define TORQUE_TOOLS will fix the onAddToScene problem, but it wont fix the torsion_precompile.tmp error.
12/03/2011 (8:58 am)
If I uncheck "Enable setModsPath" in the configuration in Torsion I get these two errors.main.cs (25): Unable to find function getModPaths
main.cs (25): Unable to find function setModPaths
The game runs, but back to square one - the onAddToScene doesn't run.
I suspect setting #define TORQUE_TOOLS will fix the onAddToScene problem, but it wont fix the torsion_precompile.tmp error.
#4
12/03/2011 (8:59 am)
By the way - it was done using a fresh install, no mods until I patched it after the initial compile.
#5
Behaviors don't have onAddToScene() callback - they're never added to the scene. Object they are assigned to have it, and that object could pass a call for this function to its behaviors, but I'm not sure if this is happens always (or ever). You better use onAdd() with behaviors. Or, if there are things you want to happen specifically when object is added to the scene, you'll need a class with onAddToScene() method assigned to the object.
12/03/2011 (3:53 pm)
Wait a minute. I'm blind apparently. There's nothing wrong with your engine!Behaviors don't have onAddToScene() callback - they're never added to the scene. Object they are assigned to have it, and that object could pass a call for this function to its behaviors, but I'm not sure if this is happens always (or ever). You better use onAdd() with behaviors. Or, if there are things you want to happen specifically when object is added to the scene, you'll need a class with onAddToScene() method assigned to the object.
#6
However even if I do change them all over to onAdd I will still get the torsion_precompile.tmp error after patching T2D.
So... surely everyone else is having this problem, or is no-one using Torsion to debug T2D apps?
12/03/2011 (4:01 pm)
Well before I compiled the engine the original installed worked fine with onAddToScene. All my behaviors are added to objects in the scene.However even if I do change them all over to onAdd I will still get the torsion_precompile.tmp error after patching T2D.
So... surely everyone else is having this problem, or is no-one using Torsion to debug T2D apps?
#7
12/04/2011 (9:08 am)
As I said, #define TORQUE_TOOLS won't get you anywhere, it's completely unrelated and I have no idea why you think it might help. Turn things back the way they were when you been able to patch, launch and debug your game. Isn't that's what you want?
#8
12/04/2011 (3:43 pm)
Well it is at that point now before changing #define TORQUE_TOOLS but the error is still there. All I've done is use the patch. Maybe I should contact Sickhead games?
#9
Second, the sections of the code you're talking about have a "#ifndef", so if TORQUE_TOOLS is NOT defined, then the onAddToScene should work. (The point being that nobody wants the ::onAddToScene code to fire in the editor.)
12/05/2011 (10:54 am)
Is there something specific you're trying to patch? I can help you just change the things you need changed. That way you can roll back to the original version and just make the few changes you need.Second, the sections of the code you're talking about have a "#ifndef", so if TORQUE_TOOLS is NOT defined, then the onAddToScene should work. (The point being that nobody wants the ::onAddToScene code to fire in the editor.)
#10
Why don't I want onAddToScene to work??? I don't get it. I've be able to implement behaviors specifically by attacking them to sprite on the screen (or off).
12/05/2011 (3:10 pm)
I just want to make the changes to fix the sourceRect error and the broken torsion debugging for TGB. That's all. So I patch as above and it wont debug still.Why don't I want onAddToScene to work??? I don't get it. I've be able to implement behaviors specifically by attacking them to sprite on the screen (or off).
#11
A hacky work around is to remove the call to the Torque Game Builder from your Torsion project settings, so that it pops up your game's directory instead.. then click on the project file to launch the builder. When you run your game from there, Torsion comes back with no errors. (outside of any in your code)
12/17/2011 (9:24 am)
I'm getting this error now when trying to use Torsion with TBG 1.7.6. A hacky work around is to remove the call to the Torque Game Builder from your Torsion project settings, so that it pops up your game's directory instead.. then click on the project file to launch the builder. When you run your game from there, Torsion comes back with no errors. (outside of any in your code)
#12
12/17/2011 (9:46 am)
@Andy - The two problems the patch was created for were resolved in 1.7.6. You should not be getting the Torsion connection error or the source rect problem. By applying the patch, you could be undoing the fixes.
#13
12/17/2011 (3:51 pm)
Ahhh 1.7.6 is now out - great. I'll use that instead.
Torque Owner Rpahut