Foward and public fonction error
#1

I have this code
PHP код:
CMD:stabalize(playeridparams[])
{
    
SendAdminText(playerid"/stabalize"params);
    new 
cibleidFloat:heal;
    if(
sscanf(params"u"cibleid)) return SendClientMessage(playeridCOLOR_GREY,"Usage: /stabalize [id]");
    
//if(playerid == cibleid) return SendClientMessage(playerid, COLOR_GREY, "You can't stabalize yourself.");
    
if(!IsMedic(playerid))
    {
        
SendClientMessage(playeridCOLOR_GREY,"You are not a LSFMD.");
    }
    
GetPlayerHealth(cibleidheal);
    
SetPlayerHealth(cibleid24501441);
    
SendClientMessage(playeridCOLOR_GREY,"The patient is now stabalize for 15 seconds.");
    
SetTimerEx("StopStabalizeHealth"15000false"i"cibleid);
    return 
1;
}
foward StopStabalizeHealth(cibleid);
public 
StopStabalizeHealth(cibleid)
{
    
SetPlayerHealth(cibleid15);

Код:
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.
Reply
#2

Hello!

You have a spelling mistake.
PHP код:
foward StopStabalizeHealth(cibleid); 
to
PHP код:
forward StopStabalizeHealth(cibleid); 
Reply
#3

Change to this.

PHP код:
forward public StopStabalizeHealth(cibleid); 
public 
StopStabalizeHealth(cibleid

    
SetPlayerHealth(cibleid15); 

Reply
#4

Oh my god thank you.
Reply
#5

You might want to check on the spelling of the word stabilize as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)