GetVehicle2DZone Errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetVehicle2DZone Errors (
/showthread.php?tid=429082)
GetVehicle2DZone Errors -
JamieVic - 08.04.2013
I seem to have two errors regarding these codes.
Код:
C:\Users\Jamie\Desktop\SAMP Server\gamemodes\roleplay.pwn(2208) : error 017: undefined symbol "GetVehicle2DZone"
C:\Users\Jamie\Desktop\SAMP Server\gamemodes\roleplay.pwn(2208) : warning 202: number of arguments does not match definition
C:\Users\Jamie\Desktop\SAMP Server\gamemodes\roleplay.pwn(2228) : error 017: undefined symbol "GetVehicle2DZone"
C:\Users\Jamie\Desktop\SAMP Server\gamemodes\roleplay.pwn(2228) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Here's the codes. I've bolded and highlighted the GetVehicle2DZone codes:
Код:
CMD:vspawn(playerid, params[])
{
new choice, vehicle;
if(sscanf(params, "i", choice)) { SendClientMessage(playerid, -1, "USAGE: /vspawn [1-5]"); return cmd_vlist(playerid, params); }
new vslot = choice-1, str[164], zone[60];
if(choice < 1 || choice > 5 ) return SendClientMessage(playerid, -1, "Valid slot numbers are 1-5.");
if(PlayerInfo[playerid][pVehicle][vslot] == 0) return SendClientMessage(playerid, -1, "You don't have a vehicle in that slot.");
if(PlayerInfo[playerid][pVehicleSpawned][vslot] == 1) return SendClientMessage(playerid, -1, "You have already spawned this vehicle.");
vehicle = CreateVehicle(PlayerInfo[playerid][pVehicle][vslot], PlayerInfo[playerid][pVehiclePosX][vslot], PlayerInfo[playerid][pVehiclePosY][vslot], PlayerInfo[playerid][pVehiclePosZ][vslot], PlayerInfo[playerid][pVehicleRot][vslot], PlayerInfo[playerid][pVehicleCol1][vslot],PlayerInfo[playerid][pVehicleCol2][vslot], 0);
GetVehicle2DZone(vehicle, zone, sizeof(zone));
format(str, sizeof(str), "You have spawned your vehicle at %s.", zone);
PlayerInfo[playerid][pVehicleSpawned][vslot] = 1;
PlayerInfo[playerid][pVehicleSpawnedID][vslot] = vehicle;
SendClientMessage(playerid, COLOR_GRAD1, str);
new plate[126];
format(plate, sizeof(plate), "LS%i", vehicle);
SetVehicleNumberPlate(vehicle, plate);
return 1;
}
Код:
CMD:vtrack(playerid, params[])
{
new choice, Float:vx, Float:vy, Float:vz;
if(sscanf(params, "i", choice)) return SendClientMessage(playerid, -1, "USAGE: /vtrack [1-5]");
new vslot = choice-1, str[164], zone[60];
if(CPT[playerid] != 0) return SendClientMessage(playerid, -1, "You can't use this command while you have an active checkpoint, use /destroycheckpoint.");
if(choice < 1 || choice > 5 ) return SendClientMessage(playerid, -1, "Valid slot numbers are 1-5.");
if(PlayerInfo[playerid][pVehicle][vslot] == 0) return SendClientMessage(playerid, -1, "You don't have a vehicle in that slot.");
if(PlayerInfo[playerid][pVehicleSpawned][vslot] == 0) return SendClientMessage(playerid, -1, "You don't have a vehicle spawned in that slot.");
GetVehicle2DZone(PlayerInfo[playerid][pVehicleSpawnedID][vslot], zone, sizeof(zone));
GetVehiclePos(PlayerInfo[playerid][pVehicleSpawnedID][vslot], vx, vy, vz);
SetPlayerCheckpoint(playerid, vx, vy, vz, 10.0);
format(str, sizeof(str), "Your vehicle is at %s.", zone);
SendClientMessage(playerid, COLOR_GRAD1, str);
return 1;
}
Re: GetVehicle2DZone Errors -
ChromeMenu - 25.02.2017
bump, I have this problem as of now