error in command system
#1

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

issue for "warning 217: loose indentation"
This
PHP код:

        
new YearMonthDay//must put on the same line
        
getdate(YearMonthDay);
        
printf("%02d/%02d/%d"DayMonthYear); 
Not this
PHP код:
new YearMonthDay;
        
getdate(YearMonthDay);
        
printf("%02d/%02d/%d"DayMonthYear); 
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(loggtargetn);
                    
fwrite(logg,"\n");
                    
fclose(logg);
                    
ShowPlayerDialog(playeridDIALOG_WELCOMEDIALOG_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
PHP код:

at the end
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)