error in command system - 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: error in command system (
/showthread.php?tid=554846)
error in command system -
semara456 - 05.01.2015
hey there i have a problem i wrote script like this
Код:
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],tid,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;
but i got this problem while compile it
Код:
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(237) : warning 217: loose indentation
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(310) : warning 204: symbol is assigned a value that is never used: "banma"
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(310) : warning 204: symbol is assigned a value that is never used: "banmt"
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(310 -- 324) : warning 217: loose indentation
F:\High Speed Drivers\gamemodes\senpai4beta.pwn(327) : error 030: compound statement not closed at the end of file (started at line 300)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
thanks for the help and sorry for my bad english
Re: error in command system -
nezo2001 - 05.01.2015
issue for "warning 217: loose indentation"
This
PHP код:
new Year, Month, Day; //must put on the same line
getdate(Year, Month, Day);
printf("%02d/%02d/%d", Day, Month, Year);
Not this
PHP код:
new Year, Month, Day;
getdate(Year, Month, Day);
printf("%02d/%02d/%d", Day, Month, Year);
and (310 -- 324) : warning 217: loose indentation
the same thing
PHP код:
new banmt[300],banma[300],tid,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", "");
and
error 030: compound statement not closed at the end of file (started at line 300)
put
at the end