Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: JayL on January 12, 2010, 04:54:34 AM

Title: CreateVehicle issue
Post by: JayL on January 12, 2010, 04: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.
Title: Re: CreateVehicle issue
Post by: Tonys on January 12, 2010, 06:30:22 AM
AddStaticVehicle instead of CreateVehicle, you could always try that.
Title: Re: CreateVehicle issue
Post by: Falcon on January 12, 2010, 08:07:27 AM
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.