23.10.2009, 02:42
up up up it says: forward afk(playerid);
if(strcmp(cmdtext,"/afk",true,10) == 0)
{
new Float:PH;
new afktimer;
afktimer = SetTimer("afk",30,true);
GetPlayerHealth(playerid,PH);
}
if(strcmp(cmdtext,"/ak"true,10) == 0)
{
KillTimer(afktimer);
TogglePlayerControllable(playerid,1);
Delete3DTextLabel(afktext);
}
return 0;
}
public afk(playerid)
{
new Float:PH, Float:PX, Float:PY, Float:PZ;
new afktext;
GetPlayerHealth(playerid,PH);
SetPlayerHealth(playerid,PH);
TogglePlayerControllable(playerid,0);
afktext = Create3DTextLabel("AFK",0xFE9D02FF,PX,PY,PZ+0.5,20 ,-1);
}
what is wrong? here are the errors...
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(212) : warning 204: symbol is assigned a value that is never used: "afktimer"
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(212 -- 215) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
if(strcmp(cmdtext,"/afk",true,10) == 0)
{
new Float:PH;
new afktimer;
afktimer = SetTimer("afk",30,true);
GetPlayerHealth(playerid,PH);
}
if(strcmp(cmdtext,"/ak"true,10) == 0)
{
KillTimer(afktimer);
TogglePlayerControllable(playerid,1);
Delete3DTextLabel(afktext);
}
return 0;
}
public afk(playerid)
{
new Float:PH, Float:PX, Float:PY, Float:PZ;
new afktext;
GetPlayerHealth(playerid,PH);
SetPlayerHealth(playerid,PH);
TogglePlayerControllable(playerid,0);
afktext = Create3DTextLabel("AFK",0xFE9D02FF,PX,PY,PZ+0.5,20 ,-1);
}
what is wrong? here are the errors...
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(212) : warning 204: symbol is assigned a value that is never used: "afktimer"
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(212 -- 215) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Pawno 0.3\gamemodes\ala.pwn(215) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.