Game Development Community

Whats Wrong!? Help...

by Jumex · in Torque Game Builder · 07/30/2007 (6:33 am) · 5 replies

Code.

function playerclass::onlevelloaded(%this, %scenegraph)
{
$pGuy = %this

movemap.bindcmd(keyboard, "left", "playerLeft();","playerLeftStop();");
movemap.bindcmd(keyboard, "right", "playerright();","Playerrightstop();");
movemap.bindcmd(keyboard, "space", "playerjump();", "";
}



Error.

C:/Users/Jumex/Desktop/Ninja/Ninja/game/gameScripts/player.cs Line: 5 - parse error
>>> Advanced script error report. Line 5.
>>> Some error context, with ## on sides of error halt:
unction playerclass::onlevelloaded(%this, %scenegraph)
{
^$pGuy = %this
^
^movemap.bindcmd(keyboard, "left", "playerLeft();","playerLeftStop();");
##^##movemap.bindcmd(keyboard, "right", "playerright();","Playerrightstop();");
^movemap.bindcmd(keyboard, "space", "playerjump();", "";
}

#1
07/30/2007 (6:35 am)
No semi-colon after $pGuy = %this <== here

Movemap.bindcmd(keyboard, "space", "playerjump();", ""; <=== error no closing bracket
#2
07/30/2007 (7:08 am)
Thank you.


I know there are applications that programers use to help find errors in there code. If I get a standard C++ error finder will that find these simple mistakes for me?
#3
07/30/2007 (7:11 am)
Yes, Torrison about $30 from GG website will help you debug errors.
#4
07/30/2007 (7:15 am)
Awsome, thanx agian.
#5
08/11/2007 (8:02 am)
Surprised that the standard package doesn't include an editor/debugger - would be nice if it did ala Visual Studio..