Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: JayL on January 12, 2010, 06:54:34 am
-
So yeah, I just started modifying the original mode script from the pawn server, adding a vehicle creating command, but when I start the server I get this error:
Script[gamemodes/mode.amx]: Run time error 19: "File or function is not found"
This is the command:
else if (strcmp(cmd, "veh", true) == 0)
{
tmp = strtok(cmdtext, idx); tmp2 = strtok(cmdtext, idx); tmp3 = strtok(cmdtext, idx);
new carid, col1, col2;
carid = strval(tmp); col1 = strval(tmp2); col2 = strval(tmp3);
if (!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "Usage: veh <carid> <col1> <col2>"); }
GetPlayerPos(playerid, x, y, z);
CreateVehicle(carid, x, y+1, z, 0, col1, col2, 60000);
return 1;
}
If I remove the CreateVehicle line, the error goes away, so CreateVehicle must be the issue. Complier points nothing wrong either.
-
AddStaticVehicle instead of CreateVehicle, you could always try that.
-
AddStaticVehicle must be used on server start OnGameModeInit().
Didn't see that CreateVehicle() was still in a_vcmp.inc, its not part of current server commands sorry.