Author Topic: CreateVehicle issue  (Read 3857 times)

0 Members and 1 Guest are viewing this topic.

Offline JayL

  • Street Thug
  • *
  • Posts: 10
    • View Profile
CreateVehicle issue
« 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:

Code: [Select]
Script[gamemodes/mode.amx]: Run time error 19: "File or function is not found"
This is the command:
Code: [Select]
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.

Offline Tonys

  • Street Thug
  • *
  • Posts: 19
    • View Profile
Re: CreateVehicle issue
« Reply #1 on: January 12, 2010, 08:30:22 am »
AddStaticVehicle instead of CreateVehicle, you could always try that.

Offline Falcon

  • VC:MP Developer
  • Wiseguy
  • *
  • Posts: 73
    • View Profile
Re: CreateVehicle issue
« Reply #2 on: January 12, 2010, 10: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.