Game Development Community

network tictactoe error

by Cheryl Gress · in Torque Game Builder · 03/10/2009 (8:16 am) · 6 replies

I have this in my console.log

Client Connected: 1346 IP:127.0.0.1:61731
Mapping string: gameStarted to index: 0
Mapping string: ServerMessage to index: 2
Mapping string: ClientJoined to index: 3
common/gameScripts/client/message.cs (13): Unable to find function onServerMessage
Mapping string: setPlayerTurn to index: 4
$myTurn = 1

Has anyone else encountered this?

#1
03/10/2009 (10:01 am)
something up with line 13 of message.cs.
#2
03/10/2009 (10:04 am)
I understand that but I didn't touch that file at all in the tutorial.

I also don't see any function onServerMessage in any of my files either

perhaps this tutorial is missing that needed function?
#3
03/10/2009 (10:07 am)
there should be an onServerMessage.


Try replacing all those networking files with new ones.
#4
03/10/2009 (10:15 am)
this is where I got the files and doing a browser search for onServerMessage comes up with nothing

http://tdn.garagegames.com/wiki/TGB/Tutorials/NetworkTicTacToe

I'm guessing it's an incomplete tutorial then
#5
06/25/2009 (11:09 pm)
Cheryl

Yes it is. I get the exact same error. I think that it, like the checkers tutorial (also network), was written ages ago and the code base has since changed making these tutorials obsolete and they have never been tested properly of late.

Given the importance of networked games now a days, and GG's boast of "out of the box netowrk", I am surprised there is not even a single WORKING example /sample/tutorial of networking for TGB. Go figure.
#6
07/25/2009 (3:53 pm)
I am not sure what the true cause of the error, "Unable to find function onServerMessage", is. However, I discovered a small typo. In the original tictactoe tutorial the scenegraph was called "TicTacToeSceneGraph". In the network tutorial, within the initClient.cs file the scenegraph is referenced as "TicTacToeScene".

Simply changing the name of the SceneGraph in the TGB to "TicTacToeScene" OR change the code in initclient.cs to:

"function TicTacToeSceneGraph::onLevelLoaded(%this, %scenegraph)"

should resolve the issue in TGB 1.7.4