Why this ? - 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: Why this ? (
/showthread.php?tid=442597)
Why this ? -
Fernado Samuel - 08.06.2013
Removed
Re: Why this ? -
stundje - 08.06.2013
This is cleary a scripting error, check for indexes that are out of bounds like it said.
Re: Why this ? -
Fernado Samuel - 08.06.2013
Removed
Re: Why this ? -
stundje - 08.06.2013
I need to have the script to fix it, I'm sorry. Maybe you could post it in a pawn on here.
Re: Why this ? -
Fernado Samuel - 08.06.2013
Removed
Re: Why this ? -
stundje - 08.06.2013
It must show you which callback it is in the debugscript.
Re: Why this ? -
Fernado Samuel - 08.06.2013
Removed
Re: Why this ? -
stundje - 08.06.2013
Quote:
Originally Posted by Fernado Samuel
Is this the problem? This is from OnPlayerPickUp callback
pawn Код:
new propid = -1; new ID = IsPlayerNearProperty(playerid); for(new id; id<MAX_PROPERTIES; id++) { if(PropInfo[id][PickupNr] == pickupid) { propid = id; break; } } if(propid != -1) { new str[128]; format(str, 128, "~y~\"%s\"~n~~y~Price: ~w~$%d~n~~y~Profit: ~w~$%d~n~~y~Owner: ~w~%s~n~~y~Prop ID: ~w~%d", PropInfo[propid][PropName], PropInfo[propid][PropValue], PropInfo[propid][PropEarning], PropInfo[propid][PropOwner], ID); GameTextForPlayer(playerid, str, 6000, 3); }
|
It might be: if(PropInfo[id][PickupNr] == pickupid) Why isnt that just a number?
Try this one
pawn Код:
new propid = -1;
new ID = IsPlayerNearProperty(playerid);
for(new id; id<MAX_PROPERTIES; id++)
{
if(PropInfo[id][PickupNr] == 0)
{
propid = id;
break;
}
}
if(propid != -1)
{
new str[128];
format(str, 128, "~y~\"%s\"~n~~y~Price: ~w~$%d~n~~y~Profit: ~w~$%d~n~~y~Owner: ~w~%s~n~~y~Prop ID: ~w~%d", PropInfo[propid][PropName], PropInfo[propid][PropValue], PropInfo[propid][PropEarning], PropInfo[propid][PropOwner], ID);
GameTextForPlayer(playerid, str, 6000, 3);
}
Re: Why this ? -
Fernado Samuel - 08.06.2013
Removed
Re: Why this ? -
stundje - 08.06.2013
Just keep it as it is, thats the best you could do.