Game Development Community

<input> 0: Unable to find function JumpOutOfCar on Dedicated Server

by Dennis Lamers · in Torque Game Engine · 08/11/2012 (6:20 pm) · 3 replies

I have been trying out very much stuff on starter.fps, today I decided to launch a dedicated server. The Buggy vehicle worked fine in Single Player, but then when I host a dedicated server it says:
<input> 0: Unable to find function JumpOutOfCar

After two hours of trying stuff I have given it up. I don't know what the problem is. If it works in Single Player, then why it doesn't work on Multiplayer... anyone who can help me out with this?
function serverCmdsetPlayerControl(%client)
{
     %client.setControlObject(%client.player);
}

function JumpOutOfCar()
{
    commandToServer('setPlayerControl');
    schedule(500, 0, "jump");
    schedule(600, 0, "jump");
}

moveMap.bindCmd(keyboard, "ctrl x","JumpOutOfCar();","");

Thank you.

#1
08/11/2012 (8:50 pm)
Where is JumpOutOfCar() defined? It needs to be in a script (.cs) file that's exec()'d on the client rather than the server.
#2
08/12/2012 (3:08 am)
JumpOutOfCar() is located at the end of the server/player.cs file. Do I need to make a new .cs file with the function and dragging this into client?
#3
08/12/2012 (4:02 am)
Problem solved, thank you very much Chris. I placed the script at the end of game.cs in client folder.