Invalid subscript 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: Invalid subscript error. (
/showthread.php?tid=392698)
Invalid subscript error. -
Louris - 15.11.2012
Error:
C:\Users\Lauris\Desktop\Servas\gamemodes\bom.pwn(1 56) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\Lauris\Desktop\Servas\gamemodes\bom.pwn(1 56) : warning 215: expression has no effect
C:\Users\Lauris\Desktop\Servas\gamemodes\bom.pwn(1 56) : error 001: expected token: ";", but found "]"
C:\Users\Lauris\Desktop\Servas\gamemodes\bom.pwn(1 56) : error 029: invalid expression, assumed zero
C:\Users\Lauris\Desktop\Servas\gamemodes\bom.pwn(1 56) : fatal error 107: too many error messages on one line
Lines:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/RR", cmdtext, true))
if(pInfo[playerid][Vip] == 1)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
Kick(i);
}
}
}
Re: Invalid subscript error. -
DrTHE - 15.11.2012
pawn Код:
if(!strcmp("/RR", cmdtext, true))
{
if(pInfo[playerid][Vip] == 1)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
Kick(i);
}
}
}
return 1;
}
Check your variable VIP.
Re: Invalid subscript error. -
gtakillerIV - 15.11.2012
Show us you "pInfo" Enum.
Re: Invalid subscript error. -
Louris - 15.11.2012
Fixed, thanks for help!