invalid function or declaration[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)
+--- Thread: invalid function or declaration[HELP!] (
/showthread.php?tid=554814)
invalid function or declaration[HELP!] -
TheTerminator - 05.01.2015
Dismiss, I think I found the problem.
Re: invalid function or declaration[HELP!] -
Banana_Ghost - 05.01.2015
try placing
pawn Код:
forward search(playerid);
above the command.
Re: invalid function or declaration[HELP!] -
TheTerminator - 05.01.2015
I'll try but I think I haven't placed some things into the code that I should have.
Re: invalid function or declaration[HELP!] -
Banana_Ghost - 05.01.2015
pawn Код:
foward search(playerid);
if(!strcmp(cmdtext, "/search"))
{
if (GetPlayerInterior(playerid) == 1)
{
SetTimerEx("search", 30*1000, false, "i", playerid);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "[ERROR: You aren't in a lootable interior!]");
}
return 1;
}
return 0;
}
public search(playerid)
{
new r = random(3);
if (r==0)
{
GivePlayerWeapon(playerid, 5, 1);
}
else if (r==1)
{
GivePlayerWeapon(playerid, 24, 50);
}
else if (r==2)
{
GivePlayerWeapon(playerid, 25, 30);
}
return 1;
}
Integers always start at 0, first number in random will be 0.