invalid function or declaration - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: invalid function or declaration (
/showthread.php?tid=560234)
invalid function or declaration -
IndependentGaming - 27.01.2015
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
Re: invalid function or declaration -
Sime30 - 27.01.2015
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;
}