23.10.2010, 10:29
Hey,
i have 7 warings .
and this
//NEW's
/
commands are right, but why i got waring help plz
i have 7 warings .
Код:
C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(1290) : warning 209: function "OnPlayerText" should return a value C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(2628) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(2628) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(2650) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(2650) : warning 219: local variable "pName" shadows a variable at a preceding level C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(2677) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(2677) : warning 219: local variable "pName" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Warnings.
Код:
public OnPlayerText(playerid) { if(AFKBRB[playerid] == 1) { SendClientMessage(playerid,TELEWARN, "ERROR: You are AFK/BRB, so you can't write in chat"); return 0; } /* public OnPlayerUpdate(playerid) { new name[256]; if(respond[playerid] == false){ respond[playerid] = true; TogglePlayerControllable(playerid,0); GetPlayerName(playerid, aname, sizeof(aname)); strins(aname,"[AFK]",0, MAX_PLAYER_NAME ); SetPlayerName(playerid,aname); } else if(respond[playerid] == true){ GetPlayerName(playerid, aname, sizeof(aname)); strdel(aname,0,5); SetPlayerName(playerid,aname); GetPlayerName(playerid,name, sizeof(name)); TogglePlayerControllable(playerid,1); return 1; } public CheckAFK(){ new i = -1; while(++i < MAX_PLAYERS){ if(!IsPlayerConnected(i)) continue; if(respond[i] == false){ // Keel them for being AFK } else respond[i] = false; } }*/
/
Код:
#define AFK_TIME 30000 new IsAfkBrb[MAX_PLAYERS]; new IsBack[MAX_PLAYERS]; new AFKBRB[MAX_PLAYERS]; new aname[MAX_PLAYER_NAME]; //new bool:respond[MAX_PLAYERS]; //forward CheckAFK(); /