undefined symbol - 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: undefined symbol (
/showthread.php?tid=409337)
undefined symbol -
Neil. - 21.01.2013
fixed
Re: undefined symbol -
Infinity90 - 21.01.2013
There are 3 words there -_- which is the unidentified... At least put some effort in explaining.
Re: undefined symbol -
LarzI - 21.01.2013
Quote:
Originally Posted by Infinity90
There are 3 words there -_- which is the unidentified... At least put some effort in explaining.
|
He did tell you if you'd actually look at the code.
@OP: Simply put the line of the error below the line underneath it :
pawn Код:
new vehicleid = AHouseData[HouseID][VehicleIDs];
new HouseID = AVehicleData[vehicleid][BelongsToHouse];// Undefined symbol vehicleid
Re : undefined symbol -
[HRD]Mar1 - 21.01.2013
pawn Код:
new HouseID = AVehicleData[MAX_VEHICLES][BelongsToHouse];// Try this
Re: Re : undefined symbol -
Neil. - 21.01.2013
Quote:
Originally Posted by LarzI
He did tell you if you'd actually look at the code.
@OP: Simply put the line of the error below the line underneath it :
pawn Код:
new vehicleid = AHouseData[HouseID][VehicleIDs]; new HouseID = AVehicleData[vehicleid][BelongsToHouse];// Undefined symbol vehicleid
|
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new currveh = GetPlayerVehicleID(playerid);
new sendername[MAX_PLAYER_NAME];
new vehicleid = AHouseData[HouseID][VehicleIDs];
new HouseID = AVehicleData[vehicleid][BelongsToHouse];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(newstate == PLAYER_STATE_DRIVER)
{
if(currveh == vehicleid)
{
if(strcmp(sendername, "Owner's name", false) == 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFF0000FF, "This is not your vehicle");
}
else
{
return 1;
}
}
}
return 1;
}
Tried that, and it says undefined symbol HouseID
Quote:
Originally Posted by [HRD]Mar1
pawn Код:
new HouseID = AVehicleData[MAX_VEHICLES][BelongsToHouse];// Try this
|
array index is out of bounds