ini file problem - 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)
+--- Thread: ini file problem (
/showthread.php?tid=554771)
ini file problem -
semara123 - 05.01.2015
hey there i have problem in my code here is my code
Код:
CMD:test(playerid,parmas[])
{
new Year, Month, Day;
getdate(Year, Month, Day);
printf("%02d/%02d/%d", Day, Month, Year);
if(fexist(UserBanPath(playerid)))
{
INI_ParseFile(UserBanPath(playerid), "LoadBanUser_%s", .bExtra = true, .extra = playerid);
if(PlayerInfo[playerid][pBanPerm]==1) return SendClientMessage(playerid,-1,"{85BB65}You are Already Absent");
{
if(Month == 01 && Year == 2015 && Day == 01) //then is date1 older .
{
new banmt[300],banma[300],targetn[MAX_PLAYER_NAME];
GetPlayerName(tid,targetn,sizeof(targetn));
new INI:iFile = INI_Open(UserIPPath(tid));
INI_SetTag(iFile,"data");
INI_WriteInt(iFile,"BanPerm",1);
INI_Close(iFile);
new File:logg=fopen("BannedPlayers.txt",io_append);
fwrite(logg, targetn);
fwrite(logg,"\n");
fclose(logg);
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You connected to the server", "Close", "");
}
return 1;}
after i compile it i got this problem
Код:
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(237) : warning 217: loose indentation
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(312) : error 017: undefined symbol "tid"
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(313) : error 017: undefined symbol "tid"
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(311) : warning 204: symbol is assigned a value that is never used: "banma"
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(311) : warning 204: symbol is assigned a value that is never used: "banmt"
F:\beta\gamemodes\senpai4beta.pwn(311 -- 324) : warning 217: loose indentation
F:beta\gamemodes\senpai4beta.pwn(326) : warning 225: unreachable code
F:\beta\gamemodes\senpai4beta.pwn(326) : warning 217: loose indentation
F:\beta\gamemodes\senpai4beta.pwn(326) : error 029: invalid expression, assumed zero
F:\beta\gamemodes\senpai4beta.pwn(326) : error 017: undefined symbol "cmd_banm"
F:\beta\gamemodes\senpai4beta.pwn(326) : error 029: invalid expression, assumed zero
F:\beta\gamemodes\senpai4beta.pwn(326) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
pls help me
thanks for the help
Re: ini file problem -
Crayder - 05.01.2015
Why is it connected to two folders?
this
new banmt[300],banma[300],targetn[MAX_PLAYER_NAME];
should be
new banmt[300],banma[300],tid,targetn[MAX_PLAYER_NAME];
but then who the fuck is tid?
Idk about the second file, thats a completely different story...