Game Development Community

Parse error woes

by Mike Rowley · in Torque Game Engine Advanced · 04/15/2008 (2:25 pm) · 2 replies

I didn't quite know which forum this should go in, (public or private) but since I'm useing TGEA 1.7.0, I decided to place this here.

I have a script for a stationary cannon. This one little function simply gets things started, then schedules another pass.

function SimSet::ShootIt( %handle )
 {
     %handle.Cannon1.getID();
     echo(Cannon1.getid());
     %handle.( doFire, true );
     %handle.schedule( 1500  , %doFire );
     }

I'm getting a parse error on: "%handle.(doFire, true );" and don't understand why.
Cannon1 is the name of my cannon in the .mis file. I get it's ID handle, save it in %handle and use it to fire my cannon, then schedule the cannon to fire again in 1500 ms.
I have tried "doFire", %doFire, "%doFire", but still get a parse error.
I'm lost.

#1
04/15/2008 (2:34 pm)
You have setup that call wrong

try the following

%handle.doFire( true );

   %handle.schedule( 1500, "doFire", true );
#2
04/15/2008 (3:38 pm)
Thankyou. That got rid of my parse error. :) and it actually works once.