Bug or Error?:( - 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: Bug or Error?:( (
/showthread.php?tid=442819)
Bug or Error?:( -
radiobizza - 09.06.2013
Please help me how to fix that error:
PHP код:
Kit-Zone\gamemodes\pcs..pwn(21671) : error 017: undefined symbol "newcar"
Kit-Zone\gamemodes\pcs..pwn(21672) : error 017: undefined symbol "newcar"
And the lines:
PHP код:
GetVehiclePos(car, CarInfo[newcar][cLocationx], CarInfo[newcar][cLocationy], CarInfo[newcar][cLocationz]);
SetPlayerCheckpoint(playerid, CarInfo[newcar][cLocationx], CarInfo[newcar][cLocationy], CarInfo[newcar][cLocationz], 6);
And the script.
PHP код:
else if(strcmp(x_nr,"locate1",true) == 0)
{
new car = PlayerInfo[playerid][pPcarkey];
new Float:cLocationx;
new Float:cLocationy;
new Float:cLocationz;
if(!IsPlayerConnected(playerid))
{
return 1;
}
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
if(PlayerOnMission[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " {CCCCCC}Poti folosi comanda cand termini {FFFFFF}Mission!");
return 1;
}
if(PlayerInfo[playerid][pPcarkey]==-1)
{
GameTextForPlayer(playerid, "~w~You do not have a car to locate", 2500, 3);
return 1;
}
}
SendClientMessage(playerid,COLOR_WHITE,"Car spawn location is red on a map");
GetVehiclePos(car, CarInfo[newcar][cLocationx], CarInfo[newcar][cLocationy], CarInfo[newcar][cLocationz]);
SetPlayerCheckpoint(playerid, CarInfo[newcar][cLocationx], CarInfo[newcar][cLocationy], CarInfo[newcar][cLocationz], 6);
CP[playerid] = 987;
return 1;
}
Re: Bug or Error?:( - Emmet_ - 09.06.2013
Put this above the "Car spawn location is red on a map" message:
pawn Код:
new newcar = GetPlayerVehicleID(playerid);
Re: Bug or Error?:( -
radiobizza - 09.06.2013
I will try..
Re: Bug or Error?:( -
radiobizza - 09.06.2013
new newcar = GetPlayerVehicleID(playerid);
I put this in "OnGameModeInit()"
?
Re: Bug or Error?:( -
radiobizza - 09.06.2013
Please help me... he set the checkpoint to the coordonates 0.0, 0.0, 0.0, ...
Re: Bug or Error?:( -
Giroud12 - 09.06.2013
Try this
pawn Код:
GetVehiclePos(car, CarInfo[car][cLocationx], CarInfo[car][cLocationy], CarInfo[car][cLocationz]);
SetPlayerCheckpoint(playerid, CarInfo[car][cLocationx], CarInfo[car][cLocationy], CarInfo[car][cLocationz], 6);