Foward and public fonction error - 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: Foward and public fonction error (
/showthread.php?tid=611352)
Foward and public fonction error -
Eymeric69 - 05.07.2016
I have this code
PHP код:
CMD:stabalize(playerid, params[])
{
SendAdminText(playerid, "/stabalize", params);
new cibleid, Float:heal;
if(sscanf(params, "u", cibleid)) return SendClientMessage(playerid, COLOR_GREY,"Usage: /stabalize [id]");
//if(playerid == cibleid) return SendClientMessage(playerid, COLOR_GREY, "You can't stabalize yourself.");
if(!IsMedic(playerid))
{
SendClientMessage(playerid, COLOR_GREY,"You are not a LSFMD.");
}
GetPlayerHealth(cibleid, heal);
SetPlayerHealth(cibleid, 24501441);
SendClientMessage(playerid, COLOR_GREY,"The patient is now stabalize for 15 seconds.");
SetTimerEx("StopStabalizeHealth", 15000, false, "i", cibleid);
return 1;
}
foward StopStabalizeHealth(cibleid);
public StopStabalizeHealth(cibleid)
{
SetPlayerHealth(cibleid, 15);
}
Код:
C:\Users\mickael\Desktop\LGRP\gamemodes\UGRP.pwn(8000) : error 010: invalid function or declaration
C:\Users\mickael\Desktop\LGRP\gamemodes\UGRP.pwn(8001) : warning 235: public function lacks forward declaration (symbol "StopStabalizeHealth")
but i seen the wiki all is good what's the problem ? Please help.
Re: Foward and public fonction error -
Mencent - 05.07.2016
Hello!
You have a spelling mistake.
PHP код:
foward StopStabalizeHealth(cibleid);
to
PHP код:
forward StopStabalizeHealth(cibleid);
Re: Foward and public fonction error -
DarkSkull - 05.07.2016
Change to this.
PHP код:
forward public StopStabalizeHealth(cibleid);
public StopStabalizeHealth(cibleid)
{
SetPlayerHealth(cibleid, 15);
}
Re: Foward and public fonction error -
Eymeric69 - 05.07.2016
Oh my god thank you.
Re: Foward and public fonction error -
Vince - 05.07.2016
You might want to check on the spelling of the word
stabilize as well.