Help (119) : error 076: syntax error in the expression, or invalid function call
#1

help i creating coins system but, i got these error ^^

CODE

pawn Код:
CMD:healme(playerid,params[])
{
 if(GetPlayerCoins == 1)//error line
  {
   SetPlayerHealth(playerid,100);
   SetPlayerArmour(playerid,100);
   SendClientMessage(playerid,-1,"You Was healed !");
   GivePlayerCoins(playerid,-1);
  }
 SendClientMessage(playerid,-1,"You Must Have 1 Coin To Heal Yourself !");
 return 1;
}
stock code

pawn Код:
stock GetPlayerCoins(playerid,amount)
{
 PlayerInfo[playerid][pCoins] < amount)
 return 1;
}

ERROR LINE

pawn Код:
if(GetPlayerCoins == 1)
Reply
#2

PHP код:
CMD:heal(playeridparams[])
{
  if(
PlayerInfo[playerid][pCoins] >= 1)
  {
    
SetPlayerHealth(playerid,100);
    
SetPlayerArmour(playerid,100);
    
SendClientMessage(playerid,-1,"You Was healed !");
    
PlayerInfo[playerid][pCoins] --;
  }
  else
  {
    
SendClientMessage(playerid,-1,"You Must Have 1 Coin To Heal Yourself !"); 
  }
  return 
1;

try this
Reply
#3

Код:
if(GetPlayerCoins(playerid, 1) == 1)//error line
Код:
stock GetPlayerCoins(playerid,amount)
{
 if (PlayerInfo[playerid][pCoins] < amount) { return 0; }
 return 1;
}
Maybe you need this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)