15.07.2011, 22:19
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.
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.