Help with Array!!
#1

I want to write a Team System.

now i have done it a lot.
Код:
enum PlayerInfo
{
  pTeam,//Police Triad DaNangBoys Mafia
  pRank
};
new pInfo[MAX_PLAYERS][PlayerInfo];
AND
Код:
public OnPlayerConnect(playerid)
{
  pInfo[playerid][pRank] = None ;
  pInfo[playerid][pTeam] = None;
}
AND
Код:
CMD:invite(blabla)
{
  blabla...
  if(pInof[playerid][pTeam] == Police && pInfo[playerid][pRank] == Leader)
  {
    blabla...
    return 1;
  }
}
This is seem wonderful ,BUT!!!!
Код:
E:\Rockstar Games\The MoonCity\gamemodes\mooncity.pwn(429) : error 017: undefined symbol "None"
E:\Rockstar Games\The MoonCity\gamemodes\mooncity.pwn(1403) : error 017: undefined symbol "Police"
E:\Rockstar Games\The MoonCity\gamemodes\mooncity.pwn(1403) : error 017: undefined symbol "Leader"
need to #define THIS or

Please Help me, THX. And excuse my BAD english.
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
Yes, you need to define those values, either with "#define" or "enum" (latter recommended).
Extremely grateful!!!!
By the way
i want to ask another question about y_ini
USE the y_ini must with SetPlayerVar
Reply
#3

no just instead of None put false
Reply
#4

Quote:
Originally Posted by CoaPsyFactor
Посмотреть сообщение
no just instead of None put false
I want write them(None,Mifia,Police....) in Account.ini
Reply
#5

then just put false, and then check if(pInfo[playerid][pRank] === false){
format(pInfo[playerid][pRank], 128, "None");
}
Reply
#6

Quote:
Originally Posted by CoaPsyFactor
Посмотреть сообщение
then just put false, and then check if(pInfo[playerid][pRank] === false){
format(pInfo[playerid][pRank], 128, "None");
}
sorry i cant see.
Reply
#7

I think you should re-read the "How to make teams" tutorial.
Reply


Forum Jump:


Users browsing this thread: