Warings | Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Warings | Help (
/showthread.php?tid=185084)
Warings | Help -
Mr.Jvxmc - 23.10.2010
Hey,
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.
and this
Код:
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;
}
}*/
//NEW's
/
Код:
#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();
/
commands are right, but why i got waring help plz
Re: Warings | Help -
iJumbo - 23.10.2010
correct onplayetext
pawn Код:
public OnPlayerText(playerid)
{
if(AFKBRB[playerid] == 1)
{
SendClientMessage(playerid,TELEWARN, "ERROR: You are AFK/BRB, so you can't write in chat");
return 0;
}
return 1;
}
for the other warnings you have to delete or rename this string and this pName in the line the warning say
add me in msn
pyrokar@libero.it i can fix it if u have teamviewer
Re: Warings | Help -
Retardedwolf - 23.10.2010
Creating a
HUGE variable in OPU. I wouldn't recommend doing that. Just use a 1 second timer or so.
Re: Warings | Help -
Mr.Jvxmc - 23.10.2010
Got fixed!
Thanks to gigi1223