Game Development Community

Compiler Corrections Manual

by rennie moffat · in Torque Game Builder · 10/07/2009 (3:30 pm) · 4 replies

Hi there, I have just discovered the compiler, or console (not sure the title) it allows me to read the and tells me the syntax errors in my script. I am just wondering is there a reference material regarding this?

The only reason I ask is because I have come across an error which I can not figure out. The error, in this case is on line 7. It says ##^## just after the if statement and before the { of the setLinearVelocity. All my brackets are closed properly. Am I missing something?


Thanks


function Spacer3000WorldLimits::onWorldLimit(%this, %limitMode, %limit)
{
switch (%limit)
{
case "left":
if (%this.owner.(getWord(%playerPosition, 0) <= %this.owner.minX())
	{
		%this.owner.setLinearVelocityX(10);
	}

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
10/07/2009 (3:32 pm)
Sorry I think I may have just found it.

Currently my %playerPosition is not declared. Would this be it?


#2
10/07/2009 (3:38 pm)
No I just added it in (%playerPosition = %this.owner.getPosition();) to my onBehaviorAdd.


So it should be on, tho my coding is weak. Any hints?
#3
10/07/2009 (4:06 pm)
There are quite a few errors here. I found this great post on how getWord works and documentation on switch.
#4
10/07/2009 (4:48 pm)
cool thanks William.


I just am plugging on the compiler, this thing will work great.