enum pInfo { Logged, Password, AdminLevel, Vip, Cash, Score, Ip[20], IsBanned }
if (strcmp("/vheal", cmdtext, true, 5) == 0) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid, white, "You Have Been Healed !"); return 1; }
if (strcmp("/vheal", cmdtext, true, 5) == 0)
{
if(pInfo[playerid][VIP]) //change this
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, white, "You Have Been Healed !");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not VIP to use this command");
}
return 1;
}
E:\Server\gamemodes\galaxy.pwn(266) : error 028: invalid subscript (not an array or too many subscripts): "pInfo" E:\Server\gamemodes\galaxy.pwn(266) : warning 215: expression has no effect E:\Server\gamemodes\galaxy.pwn(266) : error 001: expected token: ";", but found "]" E:\Server\gamemodes\galaxy.pwn(266) : error 029: invalid expression, assumed zero E:\Server\gamemodes\galaxy.pwn(266) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
enum pInfo
{
Logged,
Password,
AdminLevel,
VIP,
Cash,
Score,
Ip[20],
IsBanned
};
new PlayerInfo[MAX_PLAYERS][pInfo];
COMMAND:vheal(playerid, params[])
{
if(pInfo[playerid][VIP]) //change this
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, white, "You have been healed!");
}
else
{
SendClientMessage(playerid,COLOR_RED, "You are not VIP to use this command!");
}
return 1;
}
E:\Server\gamemodes\galaxy.pwn(267) : error 028: invalid subscript (not an array or too many subscripts): "pInfo" E:\Server\gamemodes\galaxy.pwn(267) : warning 215: expression has no effect E:\Server\gamemodes\galaxy.pwn(267) : error 001: expected token: ";", but found "]" E:\Server\gamemodes\galaxy.pwn(267) : error 029: invalid expression, assumed zero E:\Server\gamemodes\galaxy.pwn(267) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
#include <a_samp>
if(PlayerInfo[playerid][VIP]) //change this
God, are you retarded? Two people have already said that you need to input your own variable where it says "//change this"!
pawn Код:
|
if (strcmp("/vheal", cmdtext, true, 5) == 0) { if(pInfo[playerid][Vip]) //change this { SetPlayerHealth(playerid, 100); SendClientMessage(playerid, white, "You Have Been Healed !"); } else { SendClientMessage(playerid,COLOR_RED,"You are not VIP to use this command"); } return 1; }
enum pInfo { Logged, Password, AdminLevel, Vip, Cash, Score, Ip[20], IsBanned }