invalid function or declaration
#1

Hello im trying to fix this command but i dont know what it is here is the command

Код:
CMD:buyflower(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 20.0,-103.9105,-22.3268,1000.7188))
 	{
 	    new string[84];
  		if (GetPlayerCash(playerid) >= 500)
			{
				GivePlayerValidWeapon(playerid, 14, 99999);
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				format(string, sizeof(string), "Flower Purchased.");
				SendClientMessageEx(playerid, COLOR_GRAD4, string);
				if(PlayerInfo[playerid][pDonateRank] >= 4)
				    {
				        GivePlayerCash(playerid, -300);
				        SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $500, you paid $300.");
					}
					else
					{
						GivePlayerCash(playerid, -11000);
					}
				}
            }
            else
			{
                SendClientMessageEx( playerid, COLOR_WHITE, "You dont have enough cash to buy a flower." );
            }
        }
    return 1; <<ERROR LINE<<
}
Error
Код:
C:\Users\Met Henk\Desktop\DCRP\DCRP\gamemodes\DCRP.pwn(36886) : error 010: invalid function or declaration
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Error.
Thanks in advance
Reply
#2

pawn Код:
CMD:buyflower(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 20.0,-103.9105,-22.3268,1000.7188))
    {
        new string[84];
        if (GetPlayerCash(playerid) >= 500)
        {
                GivePlayerValidWeapon(playerid, 14, 99999);
                PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                format(string, sizeof(string), "Flower Purchased.");
                SendClientMessageEx(playerid, COLOR_GRAD4, string);
                if(PlayerInfo[playerid][pDonateRank] >= 4)
                {
                    GivePlayerCash(playerid, -300);
                    SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $500, you paid $300.");
                }
                else
                {
                    GivePlayerCash(playerid, -11000);
                }
        }
        else
        {
            SendClientMessageEx( playerid, COLOR_WHITE, "You dont have enough cash to buy a flower." );
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)