[HELP] Whats wrong?
#1

I got a commands but it gives error, why?
Код:
	dcmd_removereg(playerid,params[]) {
	if(PlayerVerify == 0) return SendClientMessage(playerid,COLOR_ERROR,"[Error] You must login/register before using commands /login [password] or /register [password]]");
	if(gPlayerData[playerid][player_adminlevel] <= 2) return SendClientMessage(playerid,COLOR_ERROR,"[Error] You must be a level 3 Administrator to use this command]");
	else if(gPlayerData[playerid][player_adminlevel] >= 3)
 		new tmp[256],tmp2[256],Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
	  if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_ERROR,"[Usage] /removereg [ID or Name]]");
  		new id; if(!IsNumeric(tmp)) id = ReturnPlayerID(tmp); else id = strval(tmp);
  		if(id==playerid) return SendClientMessage(playerid,COLOR_ERROR,"[Error] You cannot change your own account status]");
		if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) {
			new string[256],name[24],ActionName[24]; GetPlayerName(playerid,name,24); GetPlayerName(id,ActionName,24);
			format(string,256,"[Administrator %s has removed your 'Regular' status]",name); SendClientMessage(id,COLOR_YELLOW,string);
			format(string,256,"[You have removed 'Regular' status from %s's account]",ActionName); SendClientMessage(playerid,COLOR_YELLOW,string);
			dUserSetINT(ActionName).("regplayer",0);
		} return SendClientMessage(playerid,COLOR_ERROR,"[Error] Player is not connected]");
	}
Errors
Код:
C:\Counter-Strike 2D\BlueberryFR\gamemodes\SFFreeroam3.0.pwn(344) : error 003: declaration of a local variable must appear in a compound block
C:\Counter-Strike 2D\BlueberryFR\gamemodes\SFFreeroam3.0.pwn(344) : error 017: undefined symbol "tmp"
C:\Counter-Strike 2D\BlueberryFR\gamemodes\SFFreeroam3.0.pwn(344) : warning 215: expression has no effect
C:\Counter-Strike 2D\BlueberryFR\gamemodes\SFFreeroam3.0.pwn(344) : error 001: expected token: ";", but found "]"
C:\Counter-Strike 2D\BlueberryFR\gamemodes\SFFreeroam3.0.pwn(344) : fatal error 107: too many error messages on one line

Compilation aborted.L33T compiler 1.3.3.7	 	 	Copyright © 1337-1337, TheLeetCommunity


4 Noobs.
Dont care bout
Код:
Compilation aborted.L33T compiler 1.3.3.7	 	 	Copyright © 1337-1337, TheLeetCommunity


4 Noobs.
part
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)