[HELP] String in Enum
#1

Hello, I am currently working on a TDM mode and I want to make a PlayerInfo variable to store data as admin level and such... well I succedd stroing admin levels but when I try to store data as team name or something like that I get errors...
this is what i've done:

enum pInfo {
admin,
level,
kills,
team[256]
};

new PlayerInfo[MAX_PLAYERS][pInfo];

---------
but when I try to do:
PlayerInfo[playerid][team] = "none";
for example, I get some errors like array sizes does not much and more....
someone gave me the following code to write in this variable that works:
strmid(PlayerInfo[playerid][team], "none", 0, strlen("none"), 256);


but when I try to read:
if (PlayerInfo[playerid][team] = "agent") { AgentRandomSpawnPlayer(playerid); }
I get these errors:

warning 211: possibly unintended assignment
error 047: array sizes do not match, or destination array is too small

someone knows what's the problem?
Reply


Messages In This Thread
[HELP] String in Enum - by OmeRinG - 05.04.2009, 12:26
Re: [HELP] String in Enum - by [M2S]moe - 05.04.2009, 12:31
Re: [HELP] String in Enum - by OmeRinG - 05.04.2009, 12:32
Re: [HELP] String in Enum - by [M2S]moe - 05.04.2009, 12:32
Re: [HELP] String in Enum - by OmeRinG - 05.04.2009, 12:33
Re: [HELP] String in Enum - by [M2S]moe - 05.04.2009, 16:51
Re: [HELP] String in Enum - by FUNExtreme - 05.04.2009, 19:34

Forum Jump:


Users browsing this thread: 1 Guest(s)