18.04.2015, 12:06
Hey guys im making a createspike code have this but i was wondering how i could get max players, as its giving errors. any help would be great and will +rep for the help.
pawn Код:
Createspike(Float:x,Float:y,Float:z,Float:Angle)
{
for(new i = 0; i < sizeof(SpikeInfo); i++)
{
for(new p = 0; p < sizeof(MAX_PLAYERS); p++)
{
if(SpikeInfo[i][SpikeCreated] == 0)
{
SpikeInfo[i][SpikeCreated]=1;
SpikeInfo[i][SpikeX]=x;
SpikeInfo[i][SpikeY]=y;
SpikeInfo[i][SpikeZ]=z-0.7;
SpikeInfo[i][SpikeObject] = CreateDynamicObject(2899, x, y, z-0.88, 0, 0, Angle-90);
SpikeInfo[i][SpikeOwner] = GetName(p);
return 1;
}
}
}
return 0;
}
Код:
C:\Documents and Settings\SAMP\Desktop\SA-MP 0.3.7\filterscripts\Spikes1.pwn(120) : error 020: invalid symbol name "" C:\Documents and Settings\SAMP\Desktop\SA-MP 0.3.7\filterscripts\Spikes1.pwn(120) : error 029: invalid expression, assumed zero C:\Documents and Settings\SAMP\Desktop\SA-MP 0.3.7\filterscripts\Spikes1.pwn(120) : warning 215: expression has no effect C:\Documents and Settings\SAMP\Desktop\SA-MP 0.3.7\filterscripts\Spikes1.pwn(120) : error 017: undefined symbol "p" C:\Documents and Settings\SAMP\Desktop\SA-MP 0.3.7\filterscripts\Spikes1.pwn(120) : fatal error 107: too many error messages on one line