1 Warning, plz 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: 1 Warning, plz help! (
/showthread.php?tid=266589)
1 Warning, plz help! -
shahartal - 05.07.2011
i have this error:
(308line): warning 219: local variable "File" shadows a variable at a preceding level
in 308line:
stock UF(playerid)
{
new Name[MAX_PLAYER_NAME],File[40];
GetPlayerName(playerid,Name,sizeof(Name));
format(File,sizeof(File),"Users/%s.ShahaR",Name);
if(!dini_Exists(File)){ dini_Create(File); }
return File;
}
someone know what the problem?
Re: 1 Warning, plz help! -
Mr.1337 - 05.07.2011
Warnings are not imporant, you can compile it, It gives you the .amx.
Re: 1 Warning, plz help! -
Gforcez - 05.07.2011
Quote:
Originally Posted by Mr.1337
Warnings are not imporant, you can compile it, It gives you the .amx.
|
They are important. And try renaming
File to something like: File2, Or just remove the file variable.
Re: 1 Warning, plz help! -
Mean - 05.07.2011
Quote:
Originally Posted by Mr.1337
Warnings are not imporant, you can compile it, It gives you the .amx.
|
Loose Indentation warning might not affect the script, but it's strongly recommended to indent your code, most of the other warnings cause non-working script.
Re: 1 Warning, plz help! -
shahartal - 05.07.2011
so what to do?
Re: 1 Warning, plz help! - [L3th4l] - 05.07.2011
pawn Код:
stock UF(playerid)
{
new Name[MAX_PLAYER_NAME],i_File[40];
GetPlayerName(playerid,Name,sizeof(Name));
format(i_File,sizeof(i_File),"Users/%s.ShahaR",Name);
if(!dini_Exists(i_File)) { dini_Create(i_File); }
return 1;
}
Re: 1 Warning, plz help! -
shahartal - 05.07.2011
Quote:
Originally Posted by [L3th4l]
pawn Код:
stock UF(playerid) { new Name[MAX_PLAYER_NAME],i_File[40]; GetPlayerName(playerid,Name,sizeof(Name)); format(i_File,sizeof(i_File),"Users/%s.ShahaR",Name); if(!dini_Exists(i_File)) { dini_Create(i_File); } return 1; }
|
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(362) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(363) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(364) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(365) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(366) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(367) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(36
: error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(369) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(370) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(374) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(375) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(376) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(377) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(37
: error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(379) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(380) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(381) : error 035: argument type mismatch (argument 1)
C:\Users\user\Documents\GTA San Andreas User Files\Server\filterscripts\FcCwSsSpN.pwn(382) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
18 Errors.
Re: 1 Warning, plz help! -
robintjeh - 05.07.2011
You have multiple new file[128] (or whatever your string size is) in your gamemode. This also gave me the same when I was learning coord's
BTW, tip: any loose indentitation warnings can be supressed by doing
under your includes.
Re: 1 Warning, plz help! -
Mean - 05.07.2011
Quote:
Originally Posted by robintjeh
You have multiple new file[128] (or whatever your string size is) in your gamemode. This also gave me the same when I was learning coord's
BTW, tip: any loose indentitation warnings can be supressed by doing under your includes.
|
Can ALL OF YOU not talk about it, it's not recommended to use that pragma, and it hides obvious errors. Don't be a lazy dog and indent your mess!
Re: 1 Warning, plz help! -
shahartal - 05.07.2011
so what to do?
Re: 1 Warning, plz help! -
Mean - 06.07.2011
Maybe showing us which are the error lines? The code provided looks good.