invalid function or declaration problem need help! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: invalid function or declaration problem need help! (
/showthread.php?tid=175012)
invalid function or declaration problem need help! -
jlbw96 - 07.09.2010
well i've been making my script and when I compile I get one error which I don't know how to fix. Here is the pawn code.
pawn code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/ak47", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) > 1200)
{
GivePlayerMoney(playerid,-2000);
GivePlayerWeapon(playerid,31,60);
GameTextForPlayer(playerid, "~b~Here is your Ak47!", 3000, 1);
}else GameTextForPlayer(playerid, "You Havent Got Enough", 3000, 2);
}else GameTextForPlayer(playerid, "Now Beat The crap outta people!", 3000, 3);
return false;
}
return 1;
}
}
and this is the error I get:
C:\Users\jak\Desktop\jlbw's freeroam\filterscripts\ak47.pwn(102) : error 010: invalid function or declaration
Could anyone help me please?
Re: invalid function or declaration problem need help! -
Toni - 07.09.2010
What line is 102 in that cmd ?
This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds.
Re: invalid function or declaration problem need help! -
jlbw96 - 07.09.2010
the return 1; line
Re: invalid function or declaration problem need help! -
jlbw96 - 07.09.2010
it doesn't matter now fixed it and I can't believe it was that simple!