Game Development Community

The Million Dollar Error

by rennie moffat · in Torque Game Builder · 10/16/2009 (4:42 pm) · 12 replies

For some reason I have an error on line 11, but I am not sure what. A million dollars for the man who can fix it!


if(isObject(Spacer3000Controls))
{	
	%template = new BehaviorTemplate(Spacer3000Controls);
   
    %template.friendlyName = "Spacer 3000 Controls";
    %template.behaviorType = "Player Input";
    %template.description  = "Controls for Spacer3000";
	
	%template.addBehaviorField(upKey, "key to bind up", keybind, "keyboard up");
	%template.addBehaviorField(downKey, "key to bind down", keybind, "keyboard down");
	%template.addBehaviorField(leftKey, "key to bind move left" keybind, "keyboard left");
	%template.addBehaviorField(rightKey, "key to bind move right", keybind, "keybind right");
	
	%template.addbehaviorField(burst, "field to set Burst Value", float, 5.0);

}

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/16/2009 (4:51 pm)
%template.addBehaviorField(leftKey, "key to bind move left", keybind, "keyboard left");

You're missing a comma between "key to bind move left" and keybind.
#2
10/16/2009 (4:59 pm)
EDIT: beat to it.
#3
10/16/2009 (5:02 pm)
OH SHIT!!!


Thanks G's!


Big smiles,
ren
#4
10/16/2009 (5:06 pm)
No problem. I prefer payment in cash, non-sequential, unmarked bills. ;)
#5
10/16/2009 (5:34 pm)
I will get that too you immediately sir!
#6
10/16/2009 (6:33 pm)
you need a glasess or go to sleep some hours...
#7
10/16/2009 (7:06 pm)
No thanks man,
I gotta get this shit going pronto, so it's pretty much 9 to 5 for me.



#8
10/18/2009 (8:28 pm)
Scott, what was your hourly rate on solving this problem?
#9
10/18/2009 (8:37 pm)
lining code up in columns helps catch these sorts of errors.
eg
%template.addBehaviorField(upKey   , "key to bind up"          , keybind, "keyboard up"  );
    %template.addBehaviorField(downKey , "key to bind down"        , keybind, "keyboard down");
    %template.addBehaviorField(leftKey , "key to bind move left"     keybind, "keyboard left");
    %template.addBehaviorField(rightKey, "key to bind move right"  , keybind, "keybind right");
    
    %template.addbehaviorField(burst   , "field to set Burst Value", float  , 5.0            );
#10
10/18/2009 (8:38 pm)
.. well, modulo GG.com's funky un-indenting of the first line of a codeblock, of course. ;)
#11
10/18/2009 (10:06 pm)
On line 12 Is "keybind right" supposed to be "keyboard right" like the other three?
#12
10/18/2009 (10:19 pm)
@Justin
oh sure.

I have not tested that, in fact I have it works so I imagine, please correct me if I am wrong, but that will not affect the game play. (tho of course one should make it simple as possible in order to be typing in the right thing.)