Why Doesnt This Work?! please help
by Chris Farley · in Torque Game Engine · 11/30/2006 (5:08 pm) · 2 replies
Iv been following the tutorials to the dot, but when i test my game in TGB there is always a "parse error in line 1" of the player.cs file i made.
heres the first lines of the file:
can somebody please tell me why it doesnt work?! iv been stuck on this for an hour and i cant figure it out! please help.
heres the first lines of the file:
function PlayerFish::onLevelLoaded(%this, %scenegraph)
{
$FishPlayer = %this;
moveMap.bindCmd(keyboard, "w", "fishPlayerUp();", "fishPlayerUpStop();");
moveMap.bindCmd(keyboard, "s", "fishPlayerDown();", "fishPlayerDownStop();");
moveMap.bindCmd(keyboard, "a", "fishPlayerLeft();", "fishPlayerLeftStop();");
moveMap.bindCmd(keyboard, "d", "fishPlayerRight();", "fishPlayerRightStop();");
}can somebody please tell me why it doesnt work?! iv been stuck on this for an hour and i cant figure it out! please help.
About the author
#2
11/30/2006 (7:15 pm)
I second Tom. On the chance that you may have used copy/paste, there's a chance you grabbed a hidden character. Also, check the script before your player.cs, and make sure everything looks good there.
Associate Tom Eastman (Eastbeast314)
I don't see anything wrong with that. The only thing that comes to mind is that your script file is actually not a .cs file and has an appended hidden .txt extension or something.