SA-MP Forums Archive
Warings - 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 (/showthread.php?tid=182366)



Warings - Mr.Jvxmc - 10.10.2010

Hey i got warings

I use Nick's Simple AFK System

so i put script to GM okay. and now that say

C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(168 : 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(1689) : 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(1697) : 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(169 : 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(1706) : 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(1707) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.


Re: Warings - WillyP - 10.10.2010

make sure you dont have the variables twice in your code.

ctrl+h

(variable names)

delete one of them


Re: Warings - Mr.Jvxmc - 10.10.2010

no i don't have but want the code?


Re: Warings - SampStunta - 10.10.2010

I just don't really take notice of warnings since they're just warnings.
But all my scripts don't even have warnings anyways...
(Or errors :P)


Re: Warings - Mr.Jvxmc - 10.10.2010

if (strcmp("/brb", cmdtext, true, 10) == 0) {
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string),"You are now be right back!");
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid,0);
return 1;
}
if(strcmp("/afk",cmdtext, true) == 0) {
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string),"You are now away from keyboard!");
SendClientMessageToAll(COLOR_RED, string);
TogglePlayerControllable(playerid,0);
return 1;
}
if(strcmp("/back",cmdtext, true, 10) == 0) {
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string),"You are now back!");
SendClientMessageToAll(COLOR_GREEN, string);
TogglePlayerControllable(playerid,1);
return 1;
}

right now is mine string 64 or i should change?