Game Development Community

Unknown command" in network tutorial Checkers

by Jakob Berglund Rogert · in Torque Game Builder · 02/12/2006 (4:31 pm) · 6 replies

Hi!

I've been writing and copying to get the network framework in the Checkers tutorial working and it seems I'm getting contact but the pieces won't move when clicked and after a few hours of weeding out small mistakes on my part I'm stuck with this message in the debugger, which I can't understand what they mean, although I can guess this is about an object not being interpreted correctly. The function which inits ClientCheckerBoard seems to be working and is echoing that it's there.

The problem is that when the two clients (debug.exe and normal) have connected and brought forth the splendid table of checkers, I can't move any of the pieces by clicking/dragging/tossing the mouse.
I get these bad things from the debug:

"common/gameScripts/client/message.cs (13): Unable to find function onServerMessage"
Couldn't find anything searching the site for this one.

"check/gameScripts/client/clientCheckers.cs (203): Unknown command getPieceImage."
" Object ClientCheckerBoard(1854) ClientCheckerBoard -> CheckerBoard -> ScriptObject -> SimObject"
"check/gameScripts/client/clientCheckers.cs (208): Unable to find object: ' ' attempting to call function "setLayer""

"check/gameScripts/client/clientCheckers.cs (0): Unable to find object: ' ' attempting to call function "mount""

I bet I'm doing something wrong, but the debugmessages aren't helping me alot since mount and setlayer are functions from the engine, not my script. And I don't understand that inheritance-tree-reference.
Again, some little push in the right direction would be helpful.

Best
Jakob

#1
02/13/2006 (5:58 am)
I think I got it solved, by looking up the getPieceImage function in the checkersDemo game script and copying it. I believe I couldn't find it in the tutorial text though (but I might have been blinded by stupidity).
#2
02/14/2006 (2:10 am)
You are completely correct in it not being in the tutorial, just searched through it myself... an alternate way to switch that out without adding the command would be changing

%checker = %this.getPieceImage(%x, %y);

to this

%checker = %this.images[%x, %y];

Sorry about that, completely my fault... I did the checkers tutorial in about a day (44 pages in a day was rather frantic) so I had hoped I didn't make any mistakes, unfortunately this one exists... thank you very much for finding this :)

What I had done was add an accessor function called getPieceImage(), but I realized that I directly referenced the array of images in all but one place so I really didn't need that entire function, I had tried to cut certain parts out in the tutorial edition to make it smaller and ensure I could get it done in time for release :) Please pass on the fix to anyone you see getting stuck and thank you for finding this again.
#3
03/06/2006 (12:08 pm)
Are there any other known problems? I can't seem to get things to work right at the page 32 test and was wondering if there's something in the tutorial or if I should keep looking over it to see if I've made mistakes.
#4
03/06/2006 (3:03 pm)
What problem are you having?
#5
03/06/2006 (3:06 pm)
Once I'm connected nothing happens. The board doesn't appear. Probably a typo on my part somewhere, I just wanted to make sure there weren't any known issues I was missing.
#6
03/07/2006 (8:34 am)
Other than the one in this thread there isn't any problems that I know of. In fact it seems Jakob figured out a solution for this issue when he first went through this (before I could answer) and hasn't posted a problem yet.

Feel free to send me your working directory at

mattl (at) garagegames.com

and I'd take a look for problems :)