error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
if(listitem == 0)
{
if (GetPlayerCash(playerid) >= 500 && PlayerInfo[playerid][pDonateRank] >= 3)
{
GivePlayerCash(playerid, -500);
GivePlayerValidWeapon(playerid, 25, 60000);
format(string, sizeof(string), "Pumped Shotgun Purchase.");
SendClientMessageEx(playerid, COLOR_RED, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
}
this line>> else
{
SendClientMessageEx(playerid, COLOR_GRAD4, "You need to be gold vip +!");
}
}
if(listitem == 0)
{
if (GetPlayerCash(playerid) >= 500){
if (PlayerInfo[playerid][pDonateRank] >= 3)
{
GivePlayerCash(playerid, -500);
GivePlayerValidWeapon(playerid, 25, 60000);
format(string, sizeof(string), "Pumped Shotgun Purchase.");
SendClientMessageEx(playerid, COLOR_RED, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD4, "You need to be gold vip +!");
}
}
if(listitem == 0)
{
if (GetPlayerCash(playerid) >= 500 || PlayerInfo[playerid][pDonateRank] >= 3) {
GivePlayerCash(playerid, -500);
GivePlayerValidWeapon(playerid, 25, 60000);
format(string, sizeof(string), "Pumped Shotgun Purchase.");
SendClientMessageEx(playerid, COLOR_RED, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item or You need to be gold vip +!");
}
}
PHP код:
|
if(listitem == 0)
{
if(GetPlayerCash(playerid) < 500) return SendClientMessageEx(playerid, COLOR_GRAD4, "You don't have the cash for this item or You need to be gold vip +!");
if(PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessageEx(playerid, COLOR_GRAD4, "You need to be gold vip +!");
GivePlayerCash(playerid, -500);
GivePlayerValidWeapon(playerid, 25, 60000);
format(string, sizeof(string), "Pumped Shotgun Purchase.");
SendClientMessageEx(playerid, COLOR_RED, string);
}