how to repeat a timer 15times
#8

ty soo much guys i understand the scripts but my command is still getting errors sigh

here is the command:
--------------------------------------------
dcmd_td(playerid, params[])
{
#pragma unused params
new Regernation;
if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount()) return SendClientMessage(playerid,0xFF0000AA,"Temporary System!You Can Only Use This Command Once Per Spawn");
SetPVarInt(playerid,"CMDABUSE",GetTickCount()+1000 00000);
Regernation(playerid,15); //Error line(9977)
SendClientMessage(playerid, 0x00FF00AA, "You Are On Drugs.");
return 1;
}

here is the function:
----------------------------------------------------------
forward Regeneration(playerid, times);
public Regeneration(playerid, times)
{
if(0 < times)
{
new Float: Health;
if(GetPlayerHealth(playerid, Health))
{
if(100.0 < (Health += 2.0)) SetPlayerHealth(playerid, 100.0);
else
{
SetPlayerHealth(playerid, Health);
SetTimerEx("Regeneration", 2000, false, "dd", playerid, times - 1);
}
return true;
}
}
return false;
}
----------------------------------------------------------------------------
And the errors :


(9977) : error 012: invalid function call, not a valid address
(9977) : warning 215: expression has no effect
(9977) : warning 215: expression has no effect
(9977) : error 001: expected token: ";", but found ")"
(9977) : error 029: invalid expression, assumed zero
(9977) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread
how to repeat a timer 15times - by MWhite_005 - 15.07.2011, 17:43
Re: how to repeat a timer 15times - by Tigerkiller - 15.07.2011, 17:46
Re: how to repeat a timer 15times - by MWhite_005 - 15.07.2011, 18:01
Re: how to repeat a timer 15times - by Seven_of_Nine - 15.07.2011, 19:09
Re: how to repeat a timer 15times - by Roko_foko - 15.07.2011, 19:13
Re: how to repeat a timer 15times - by Jefff - 15.07.2011, 19:14
AW: Re: how to repeat a timer 15times - by Nero_3D - 15.07.2011, 22:08
Re: how to repeat a timer 15times - by MWhite_005 - 15.07.2011, 22:19
Re: how to repeat a timer 15times - by MWhite_005 - 15.07.2011, 22:27
Re: how to repeat a timer 15times - by Adil - 15.07.2011, 22:31

Forum Jump:


Users browsing this thread: 3 Guest(s)