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
new PlayerInfo[MAX_PLAYERS][PlayerData]; new pLevel; enum PlayerData { pLevel }
new PlayerInfo[MAX_PLAYERS][PlayerData];
new pLevel;
enum PlayerData
{
pLevel
}
enum PlayerData
{
pLevel
}
new PlayerInfo[MAX_PLAYERS][PlayerData];
PlayerInfo[playerid][pLevel] == 4)
PlayerInfo[playerid][pLevel] = 4;
Originally Posted by 0rb
You also have those weird lines:
pawn Код:
pawn Код:
|
if(PlayerInfo[playerid][pLevel]==4)
PlayerInfo[playerid][pLevel]=4;
Originally Posted by -The_Badger-
[pawn]if(PlayerInfo[playerid][pLevel]==4)
|
[playerid][pLevel]
enum PlayerData { pLevel } new PlayerInfo[MAX_PLAYERS][PlayerData]; 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 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 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; } } return 1; } /* Other Commands Here */ return 0; }
Originally Posted by Anwix
Код:
enum PlayerData { pLevel } new PlayerInfo[MAX_PLAYERS][PlayerData]; 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 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 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; } } return 1; } /* Other Commands Here */ return 0; } |
C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(144) : error 017: undefined symbol "PlayerInfo" C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(144) : warning 215: expression has no effect C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(144) : error 001: expected token: ";", but found "]" C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(144) : error 029: invalid expression, assumed zero C:\DOCUME~1\User\Desktop\LEVELS~1.PWN(144) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.