Fatal t2dPath.cc @28 getPathMode() - Invalid Path Mode
by Jason Darby · in iTorque 2D · 06/16/2010 (2:10 pm) · 26 replies
When going into certain screens on my iphone game (on the simulator, i am getting this fatal error
t2dPath.cc @28
GetPathMode() Invalid Path Mode
Did a search on the forums and not really much i can find, one post did mention physics and switching it on... but that doesnt seem to have fixed it....
Anyone else encountered this error and confirm its to do with an objects direction/path and physics being switched off? Ive tried the following in the scene that is getting the problem...
UseUpdateCallback = "1";
setUsesPhysics = "1"; (also tried usesphysics)
Anyone else have any ideas?
Just typical, 2nd game has taken so long to get done... and when i actually have some energy to finish it, i have a problem :D just my luck!!!!
Jason
t2dPath.cc @28
GetPathMode() Invalid Path Mode
Did a search on the forums and not really much i can find, one post did mention physics and switching it on... but that doesnt seem to have fixed it....
Anyone else encountered this error and confirm its to do with an objects direction/path and physics being switched off? Ive tried the following in the scene that is getting the problem...
UseUpdateCallback = "1";
setUsesPhysics = "1"; (also tried usesphysics)
Anyone else have any ideas?
Just typical, 2nd game has taken so long to get done... and when i actually have some energy to finish it, i have a problem :D just my luck!!!!
Jason
About the author
Computer games book author, have written 6 game creation books, published by Cengage Course Technology. Owner of Arcade website www.madword.com and Castle software.
#2
06/16/2010 (3:05 pm)
If i remove PUAP_OPTIMIZE from the preprocessor definitionsm, the object moves along the path, but i am still getting the error... Me confused.com :)
#3
06/17/2010 (11:29 am)
Anyone know the answer to this, its basically stopping my game from being released :( (I hate talking to myself...lol)
#4
You will think with such a precise error message, there would be some indication of what the problem is so i can focus on the area that is causing the problem.
06/19/2010 (5:45 am)
Anyone got any ideas, i cannot release my new game because of this issue. I emailed garage as per the support instructions, and ive had no reply from them either.You will think with such a precise error message, there would be some indication of what the problem is so i can focus on the area that is causing the problem.
#6
06/21/2010 (7:39 am)
Hi Jason, I don't have this error ... but ... can you let me know which version of xcode, iTGB, iPhone SDK etc Also, are you using paths and are they LINEAR? I don't think you can switch off physics for LINEAR paths.
#7
Hey Scott... :)
iTGB 1.3
X-Code 3.2.1 - Xcode IDE (1613.0)
iPhone SDK ... errrm i think its 3.1 (7C144 ?)
Using Linear Paths.
Many thanks
Jason
06/21/2010 (2:29 pm)
Hey Scott... :)
iTGB 1.3
X-Code 3.2.1 - Xcode IDE (1613.0)
iPhone SDK ... errrm i think its 3.1 (7C144 ?)
Using Linear Paths.
Many thanks
Jason
#11
When using the debugger console, there is message before the issue.... dont know if its related... -
bogus mRemapTable[i] value in @DFKai-SB 96
Jason
06/22/2010 (2:35 am)
Yeah its all in caps :)When using the debugger console, there is message before the issue.... dont know if its related... -
bogus mRemapTable[i] value in @DFKai-SB 96
Jason
#12
06/22/2010 (9:23 am)
The error you get is indicating that the path mode is not in the enumerated list - hence the assert failure. Can you post your code snippet please where you are creating and using the path?
#13
------------------------
This is the scene
06/22/2010 (10:16 am)
Hmm not sure what you want, so here are a couple of snipets :D------------------------
This is the scene
new t2dPath(horizontal_arrow_path) {
pathType = "LINEAR";
pathModeEnum = "WRAP";
canSaveDynamicFields = "1";
class = "ArrowAimingCursorPathX";
Position = "21.299 -7.947";
size = "25.509 4.000";
mountID = "2";
node0 = "34.053680 -7.956971 0.000000 10.000000";
node1 = "8.544591 -7.930938 0.000000 10.000000";
node2 = "21.121975 -7.962843 0.000000 10.000000";
nodeCount = "3";
objectCount = "0";
};--------------
#14
06/22/2010 (10:18 am)
This is some of the class:// --------------------------------------------------------------------
function state2(%this)
{
$arrowAimingCursorHandle.stateIndex = 2;
// Set the position of the path (Y) to the same as the cursor object.
%position = $arrowAimingCursorHandle.getPosition();
$arrowAimingCursorPathXHandle.setPosition($arrowAimingCursorPathXHandle.getPosition().X, %position.Y);
// Delete the y axis path as we no longer have use for it.
$arrowAimingCursorPathYHandle.detachObject($arrowAimingCursorHandle);
// Attach the object the the path that is used for deciding the x axis and set all of the
// appropriate values. For some reason the attachObject method does not seam to work
// correctly and therefore the need to set the values seperately.
$arrowAimingCursorPathXHandle.attachObject($arrowAimingCursorHandle, 10, 2, 0, REVERSE, -1, true);
$arrowAimingCursorPathXHandle.setStartNode($arrowAimingCursorHandle, 2);
$arrowAimingCursorPathXHandle.setEndNode($arrowAimingCursorHandle, 0);
$arrowAimingCursorPathXHandle.setFollowMode($arrowAimingCursorHandle, "WRAP");
$arrowAimingCursorPathXHandle.setLoops($arrowAimingCursorHandle, -1);
$arrowAimingCursorPathXHandle.setSpeed($arrowAimingCursorHandle, $ARROW_AIMING_SPEED::cursorHorizontalSpeed);
$arrowAimingCursorPathXHandle.setOrient($arrowAimingCursorHandle, false);
// Get a random direction for the cursor to start in
if(getRandom(0,1) == 0)
{
$arrowAimingCursorPathXHandle.setMoveForward($arrowAimingCursorHandle, false);
}
}
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
function state3(%this)
{
$arrowAimingCursorHandle.stateIndex = -1;
$arrowAimingCursorHandle.endState = true;
$arrowAimingCursorPathXHandle.detachObject($arrowAimingCursorHandle);
}
#15
The method call is:
You have:
I think that REVERSE has to be in quotes?
06/22/2010 (11:22 am)
Line 16 is looking a bit suspect.The method call is:
%somePath.attachObject(%object, %speed, [%direction = 1], [%startNode = 0], [%endNode = 0], [%followMode = "WRAP"], [%loops = 0], [%sendToStart = false])
You have:
%somePath.attachObject($arrowAimingCursorHandle, 10, 2, 0, REVERSE, -1, true);
I think that REVERSE has to be in quotes?
#16
iTGB/TGB is starting to get on my nerves as this worked perfectly in Windows and on the MAC on TGB...
Its lucky there is someone on the forums like yourself, because i got no reply from Garage from their email support line (email us within 24 hours if you have a problem).....and until you came along and posted i was basically talking to myself.
If i hadnt paid $700 for all this software i would seriously consider moving elsewhere due to the lack of actual forum traffic, but also lack of support.... and things that are so infuriating with the software.
So once AGAIN!!! you have saved me from getting very angry at the computer.....and hopefully it wont be long after i have fixed all the other little things and can release another game. Just thankful that there is a helpful chap like yourself willing to spend some of his own time helping others. So once again, thanks :D
06/22/2010 (3:06 pm)
Well you are amazing!!!!!! yes it was that :)iTGB/TGB is starting to get on my nerves as this worked perfectly in Windows and on the MAC on TGB...
Its lucky there is someone on the forums like yourself, because i got no reply from Garage from their email support line (email us within 24 hours if you have a problem).....and until you came along and posted i was basically talking to myself.
If i hadnt paid $700 for all this software i would seriously consider moving elsewhere due to the lack of actual forum traffic, but also lack of support.... and things that are so infuriating with the software.
So once AGAIN!!! you have saved me from getting very angry at the computer.....and hopefully it wont be long after i have fixed all the other little things and can release another game. Just thankful that there is a helpful chap like yourself willing to spend some of his own time helping others. So once again, thanks :D
#17
06/22/2010 (4:53 pm)
Jason, glad to have helped :) On a roll tonight, Rennie is also back in business.
#18
06/29/2010 (12:27 pm)
Scott, i still have a problem with another screen and its path (this is the AI screen). That had quote marks missing, but there is no error in the console, the object just doesnt follow the path. it says it has but doesnt move... any ideas?function setPath(%arrow, %index)
{
switch$(%index)
{
// Bullseye - 10 points
case 0:
%arrow.setLayer(1);
%lastIndex = arrow_path_0.getNodeCount() - 1;
arrow_path_0.attachObject(%arrow, 70, 1, %lastIndex, "WRAP", 1, true);
arrow_path_0.setRotationOffset(%arrow, 90);
arrow_path_0.setStartNode(%arrow, 0);
arrow_path_0.setEndNode(%arrow, %lastIndex);
arrow_path_0.setFollowMode(%arrow, "WRAP");
arrow_path_0.setLoops(%arrow, 1);
arrow_path_0.setSpeed(%arrow, 70);
arrow_path_0.setOrient(%arrow, true);
echo("Arrow attached to path 0");
// Ring 1 - 8 points
case 1:
%arrow.setLayer(1);
%lastIndex = arrow_path_1.getNodeCount() - 1;
arrow_path_1.attachObject(%arrow, 70, 1, %lastIndex, "WRAP", 1, true);
arrow_path_1.setRotationOffset(%arrow, 90);
arrow_path_1.setStartNode(%arrow, 0);
arrow_path_1.setEndNode(%arrow, %lastIndex);
arrow_path_1.setFollowMode(%arrow, "WRAP");
arrow_path_1.setLoops(%arrow, 1);
arrow_path_1.setSpeed(%arrow, 70);
arrow_path_1.setOrient(%arrow, true);
echo("Arrow attached to path 1");
// Ring 4 - 2 points
case 4:
%arrow.setLayer(1);
%lastIndex = arrow_path_2.getNodeCount() - 1;
arrow_path_2.attachObject(%arrow, 70, 1, %lastIndex, "WRAP", 1, true);
arrow_path_2.setRotationOffset(%arrow, 90);
arrow_path_2.setStartNode(%arrow, 0);
arrow_path_2.setEndNode(%arrow, %lastIndex);
arrow_path_2.setFollowMode(%arrow, "WRAP");
arrow_path_2.setLoops(%arrow, 1);
arrow_path_2.setSpeed(%arrow, 65);
arrow_path_2.setOrient(%arrow, true);
echo("Arrow attached to path 2");
}
}
#19
I'm not sure why you are using path.attachObject and then calling the individual setters e.g. you could re-write like so:
Also I don't recognise this method on a t2dpath:
06/29/2010 (12:49 pm)
Hi Jason, which one of the three doesn't work?I'm not sure why you are using path.attachObject and then calling the individual setters e.g. you could re-write like so:
case 0:
%arrow.setLayer(1);
%lastIndex = arrow_path_0.getNodeCount() - 1;
arrow_path_0.attachObject(%arrow, 70, 0, %lastIndex, "WRAP", 1, true);
arrow_path_0.setOrient(%arrow, true);
echo("Arrow attached to path 0");Also I don't recognise this method on a t2dpath:
arrow_path_0.setRotationOffset(%arrow, 90);
#20
Only 1 path actually works i believe which is path 0. The echo appears in the console. I will replace the code with what you suggested and see if that works.
Many thanks
Jason
06/29/2010 (12:56 pm)
I will have to speak with the programmer, as i dont know exactly why he has done certain things. The most irritating thing is that it all works fine in TGB.Only 1 path actually works i believe which is path 0. The echo appears in the console. I will replace the code with what you suggested and see if that works.
Many thanks
Jason
Torque Owner Jason Darby
Would i place it just at the top of the scene file or for each object?