[POMOC] Mala pomoc/savjet

Započeo needer
22. Apr. 2013. Zaključano
395
pregleda
2
postova
needer
3
Wheel Man
22. Apr. 2013.
Skripta koju koristim: Vlastita.
Detaljan opis problema:
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\pawno\include\YSI\y_utils.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\pawno\include\YSI\y_utils.inc(310) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\pawno\include\YSI\y_utils.inc(342) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\pawno\include\YSI\y_utils.inc(360) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\gamemodes\BRP.pwn(112) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\gamemodes\BRP.pwn(112) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\BUENO ROLEPLAY\gamemodes\BRP.pwn(134) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

7 Warnings.

Dio skripte:
new Level,Novac;
new msgbox;
new string,playername;
CMD:stats(playerid, params[])
{
Level=PlayerInfo;
Novac=PlayerInfo;
GetPlayerName(playerid,playername,sizeof(playername));
    format(playername,sizeof playername,"Ime: %s",playername);
msgbox="Level: %d\nNovac: %d\n";
format(string,sizeof string,msgbox, Level, Novac);
ShowPlayerDialog(playerid,Dialogonclick,0,playername,string,"Ok","");
return 1;
}


Nešto sam čačkao, mjenjao, svašta radio i imam te warninge, a IG sve radi, ali smetaju mi.
Mislim da je zbog newova jer ih imam već definisane u UserPathu:
stock UserPath(playerid)
{
new string,playername;
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}


Izvorni dio koda bi trebao biti ovakav:
GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
format(PlayerName,sizeof PlayerName,"Ime: %s",PlayerName);


Eto ako mi neko može pojasniti malo ovo.
Blaeks_Biofor
5
Forum Don
22. Apr. 2013.
local variable "string" shadows a variable at a preceding level
znaci da ta varijabla ne precizira ono za sta je koriscena, tako da joj izmeni ime u neko drugo, posto ne smes imati vise varijabli istog imena

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha