Warings
#1

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.
Reply
#2

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

ctrl+h

(variable names)

delete one of them
Reply
#3

no i don't have but want the code?
Reply
#4

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)
Reply
#5

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)