Game Development Community

Chapter 3 help...please

by Daniel Hannigan · in Torque Game Engine · 07/20/2004 (8:14 am) · 5 replies

As you can tell in the title, I've hit a snag, and its annoying. I'm currently in the secion "3d Programming" And I've typed up the programs "moveshape.cs" and "turnshape.cs" but they seem to encounter errors when I run them. The compiler works, and when I run them in DOS it seems to go well, then when I run it inside the Torque engine game, typing in the exec("CH3/filename.cs"); it encounters an error, and this is what it looks like...


exec("CH3/turnshape.cs");
Compiling CH3/turnshape.cs...
CH3/turnshape.cs Line:48 - Syntax error.
>>> Advanced script error report. Line 95.
>>> Some error context, with ## on the sides of error halt.
// -------------------------------------------
{
%xfrm = %shape.getTransform();
%1x ##=## getword(%xfrm,0); // first, get the current transform values
%1y = getword(%xfrm,1);
>>> Error report complete.

Then The error comes up again after that when it says "Executing CH3/turnshape.cs"

What does this mean? I've not figured it out, and followed the book exactly, or so I beleive. Can any of you help me out? I would really appreciate it.

Thanks,
Daniel Hannigan

About the author


#1
07/20/2004 (9:44 am)
Your variables can not start with a number. You need to change %1x and %1y. If i recall those should be "l" (letter l) not "1" (number one).
#2
07/20/2004 (9:56 am)
Wow, you are right! I just compared the two...oy, do i feel a bit foolish! Thanks a ton though. I'll get to work on that.

Thanks so much!
#3
07/20/2004 (10:06 am)
ACK! Another error seems to be pluaging me, sorry to be bothering but...its so odd. The error displays this as the trouble point:

%shape.setTransform(%Ix SPC %Iy SPC %Iz SPC "0 0 1 0");
}

fucntion DoMoveTest(##)##
// ----------------------------------------------------
// a function to tie together the instantiation


I dont know if this is a typo on my part again, because that is what the book shows to do. Any help again please?
#4
07/20/2004 (10:18 am)
Change fucntion -> function
#5
07/20/2004 (10:34 am)
Thats what I just found actually, I did a typo on all the programs and thats what caused it. Whoops! Thanks for the help though, I'll just be a bit more carefull when typing now.