07.11.2009, 12:29
Hi all im making level system that vould look like this..
level 1 - can use flip
level 2 - antifall
etc...
i have problem.. with this
there is errors..
Where i need to write playerinfo etc
other codes
level 1 - can use flip
level 2 - antifall
etc...
i have problem.. with this
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new idx; new Money; cmd = strtok(cmdtext, idx); Money = GetPlayerMoney(playerid); if(strcmp("/buylevel", cmdtext, true, 10) == 0) { if(PlayerInfo[playerid][pLevel] == 0) { if(Money >= 10000) { SendClientMessage(playerid,COLOR_1,"You Have bought level 1!"); PlayerData[playerid][pLevel] == 1) return 1; } } else if(PlayerInfo[playerid][pLevel] == 1) { if(Money >= 15000) { SendClientMessage(playerid,COLOR_1,"You Have bought level 2!"); PlayerInfo[playerid][pLevel] == 2) flip = 1; return 1; } } else else if(PlayerInfo[playerid][pLevel] == 2) { if(Money >= 20000) { SendClientMessage(playerid,COLOR_1,"You Have bought level 3!"); PlayerInfo[playerid][pLevel] == 3) flip = 1; return 1; } } else else if(PlayerInfo[playerid][pLevel] == 3) { if(Money >= 40000) { SendClientMessage(playerid,COLOR_1,"You Have bought level 4!"); PlayerInfo[playerid][pLevel] == 4) flip = 1; return 1; } }
Код:
C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(145) : error 017: undefined symbol "PlayerInfo" C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(145) : warning 215: expression has no effect C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(145) : error 001: expected token: ";", but found "]" C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(145) : error 029: invalid expression, assumed zero C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(145) : fatal error 107: too many error messages on one line
other codes
Код:
new PlayerInfo[MAX_PLAYERS][PlayerData]; new pLevel; enum PlayerData { pLevel }