I got that 4 Errors!
#1

Hello, i got that errors when i changed name of clan to { 7L }

46310 :
Код:
if(PlayerInfo[playerid][7L] >= 1) {
Код:
//7L gang menu
CMD:7lhelp(playerid,params[]) {
	#pragma unused params
	if(PlayerInfo[playerid][7L] >= 1) {
		SendMessageToPlayer(playerid,COLOR_GREEN,"    ---=7 Legacy Commands=---");
        SendMessageToPlayer(playerid,lightblue,"/7Lmembers (shows 7L the members online)");
        SendMessageToPlayer(playerid,lightblue,"/set7L (sets 7L Rank )");
        SendMessageToPlayer(playerid,lightblue,"/getall7L (teleports All 7L members)");
		SendMessageToPlayer(playerid,lightblue,"/7Lhome (teleports you to 7Llied base)");
		SendMessageToPlayer(playerid,lightblue,"/7Lweaps (gives you All the 7 Legacy weapons)");
		SendMessageToPlayer(playerid,lightblue,"/7Lh (tells other online 7 Legacy members that you need help)");
		SendMessageToPlayer(playerid,lightblue,"/7L (7Legacy private chat)");
		SendMessageToPlayer(playerid,lightblue,"/7Lafk (7L AFK)");
		SendMessageToPlayer(playerid,lightblue,"/7Lback (7L back)");
		SendMessageToPlayer(playerid,lightblue,"/7Lsay (7Legacy public say)");
	} else return SendMessageToPlayer(playerid,COLOR_RED, "ERROR: You need to be a 7L member to use this command");
	return 1;}

CMD:7lsay(playerid,params[]) {
	#pragma unused params
	if(PlayerInfo[playerid][7L] >= 3) {
 		if(isnull(params)) return SendMessageToPlayer(playerid,COLOR_RED, "USAGE: /7Lsay [text]");
		new string[128]; format(string, sizeof(string), "**[7L] Member %s: %s", PlayerName2(playerid), params[0]);
		return SendMessageTo7Ll(COLOR_BRIGHTRED,string);
	} else return SendMessageToPlayer(playerid,COLOR_RED,"ERROR: You must be a 7L gang Member to use this command");}

CMD:7lhome(playerid,params[]) {
	if(PlayerInfo[playerid][7L] >= 1) {
	if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
	instunt[playerid] = 1;
	TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid);
	tseconds[playerid] = 6;
	format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
	if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
	vCount[playerid] = 1;
	Tx[playerid] =2184.5735;
	Ty[playerid] =2416.6150;
	Tz[playerid] =73.0339;
	Ti[playerid] = 0;
	new string[128];
	new dsname[MAX_PLAYER_NAME];
	format(telestring,43,"~b~~h~] 7Llied base ]");
	GetPlayerName(playerid, dsname, sizeof(dsname));
	format(string, sizeof(string), "[TELE]:%s Has Just Teleported To 7L base /7Lhome", dsname);
	SendClientMessageTo7Ll(COLOR_ORANGE, string);
	} else return SendClientMessage(playerid,red,"ERROR: You need to be a 7L member to use this command");
	return 1;}

CMD:7lmembers(playerid,params[])
{
    #pragma unused params
    new count = 0;
    new string[128];
    new ChangeColor;
    new 7LR[128];
    if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You need to be Logged in to use this command");
    SendClientMessage(playerid, 0xFF0000AA, " ");
    SendClientMessage(playerid, 0x00FFFFAA, "__________ |- Online 7Llied Members -| __________");
    SendClientMessage(playerid, 0xFF0000AA, " ");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][LoggedIn] == 0) continue;
        if(PlayerInfo[i][7L] == 0) continue;

        if(PlayerInfo[i][7L] == 1) { 7LR = "Recruit"; ChangeColor = 0xAA3333AA; }
        if(PlayerInfo[i][7L] == 2) { 7LR = "Senior"; ChangeColor = 0xAA3333AA; }
        if(PlayerInfo[i][7L] == 3) { 7LR = "Profession7L"; ChangeColor = 0xAA3333AA; }
		if(PlayerInfo[i][7L] == 4) { 7LR = "Speci7List"; ChangeColor = 0xAA3333AA; }
		if(PlayerInfo[i][7L] == 5) { 7LR = "Master"; ChangeColor = 0x0000BBAA; }
		if(PlayerInfo[i][7L] == 6) { 7LR = "Maestro"; ChangeColor = 0x008080FF; }
		if(PlayerInfo[i][7L] == 7) { 7LR = "Warlord"; ChangeColor = 0x33AA33AA; }
		if(PlayerInfo[i][7L] == 8) { 7LR = "Warking"; ChangeColor = 0xFF0000AA; }

        format(string, 128, "Rank: %d - %s (Id:%i) | %s |",PlayerInfo[i][7L], PlayerName2(i),i,7LR);
        SendClientMessage(playerid, ChangeColor, string);
        count++;
    }
    if (count == 0) SendClientMessage(playerid,0xFF0000AA,"No online 7Llied Members");
    SendClientMessage(playerid, 0x00FFFFAA, "_________________________________________________");
    return 1;
}


CMD:7lafk(playerid,params[]) {
	#pragma unused params
	if(PlayerInfo[playerid][7L] >= 1) {
		new string[256],kuldoneve[MAX_PLAYER_NAME];
		SendMessageToPlayer(playerid,0x99FF00AA,"Type /back when you back.");
		GameTextForPlayer(playerid,"~r~ Are you now AFK", 5000, 1);
		TogglePlayerControllable(playerid, 0);
		GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
		format(string, sizeof(string), "%s now away from keyboard",kuldoneve, playerid);
		SendMessageTo7Ll(COLOR_YELLOW, string);
	} else return SendMessageToPlayer(playerid,COLOR_RED,"ERROR: You need to be A [7L]Member to use this command.");
	return 1;}

CMD:7lback(playerid,params[]) {
	#pragma unused params
	if(PlayerInfo[playerid][7L] >= 1) {
		new string[256],kuldoneve[MAX_PLAYER_NAME];
		GameTextForPlayer(playerid,"~g~ Welcome Back", 5000, 1);
		TogglePlayerControllable(playerid, 1);
		GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
		format(string, sizeof(string), "%s now back!", kuldoneve, playerid);
		SendMessageTo7Ll(COLOR_YELLOW, string);
	} else return SendMessageToPlayer(playerid,COLOR_RED,"ERROR: You need to be A [7L]Member to use this command.");
	return 1;}

CMD:getall7l(playerid,params[]) {
    #pragma unused params
	if(PlayerInfo[playerid][LL] >= 7) {
		new Float:x,Float:y,Float:z, interior = GetPlayerInterior(playerid);
    	GetPlayerPos(playerid,x,y,z);
	   	for(new i = 0; i < MAX_PLAYERS; i++) {
			if(IsPlayerConnected(i) && (i != playerid)) {
			 if(PlayerInfo[i][LL] >= 1){
			 if(PlayerInfo[i][LoggedIn] == 1) {
				PlayerPlaySound(i,1057,0.0,0.0,0.0); SetPlayerPos(i,x+(playerid/4)+1,y+(playerid/4),z); SetPlayerInterior(i,interior);}}}}
  		new string[128];
  		if(PlayerInfo[playerid][LL] == 8)
	  	format(string,sizeof(string),"Warking \"%s\" has teleported 7Ll  7Llied members", pName(playerid) );
	  	if(PlayerInfo[playerid][LL] == 7)
	  	format(string,sizeof(string),"Warlord \"%s\" has teleported 7Ll  7Llied members", pName(playerid) );
		MessageToLL(red,string);
		CMDMessageToLL(playerid,"Get7LlLL");
	} else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be 7L higher level to use this command");
	return 1;
}

CMD:7lweaps(playerid,params[]) {
	if(PlayerInfo[playerid][7L] >= 1) {
		GivePlayerWeapon(playerid,8,9000); GivePlayerWeapon(playerid,28,9000); GivePlayerWeapon(playerid,16,9000);
        GivePlayerWeapon(playerid,31,9000);	GivePlayerWeapon(playerid,24,9000);
		GivePlayerWeapon(playerid,34,9000); GivePlayerWeapon(playerid,26,9000);
		return 1;
	} else return SendMessageToPlayer(playerid,COLOR_RED,"ERROR: You must be a 7L member to use this command");}

CMD:set7l(playerid,params[]) {
	if(PlayerInfo[playerid][LoggedIn] == 1) {
		if(IsPlayerAdmin(playerid) && PlayerInfo[playerid][Level] >= 8 || PlayerInfo[playerid][7L] >= 7)
		{
		    new tmp[128], tmp2[128], Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
		    if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /set7L [playerid] [level]");
	    	new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
			player1 = strv7L(tmp);
			if(isnull(tmp2)) return SendClientMessage(playerid, red, "USAGE: /set7L [playerid] [level]");
			level = strv7L(tmp2);

			if(IsPlayerConnected(player1) && player1 != INV7LID_PLAYER_ID) {
				if(PlayerInfo[player1][LoggedIn] == 1) {
					if(level > 8 ) return SendClientMessage(playerid,red,"ERROR: Max 7L Level is 7");
					if(level == PlayerInfo[player1][7L]) return SendClientMessage(playerid,red,"ERROR: Player is 7Lready this 7L level");
	       			MessageToAdmins(playerid,"SET7L");
					GetPlayerName(player1, playername, sizeof(playername));	GetPlayerName(playerid, adminname, sizeof(adminname));
			       	new year,month,day;   getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);

					if(level > 0) format(string,sizeof(string)," %s has set youre 7L Status to level %d",adminname, level);
					else format(string,sizeof(string)," %s has set youre 7L Status to level %d",adminname, level);
					SendClientMessage(player1,blue,string);

					if(level > PlayerInfo[player1][7L]) GameTextForPlayer(player1,"7L LEVEL UP", 2000, 3);
					else GameTextForPlayer(player1,"7L LEVEL DOWN", 2000, 3);

					format(string,sizeof(string),"You have made %s 7L Level %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
					format(string,sizeof(string),"%s has made %s 7L Level %d on %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
					SaveToFile("7Lmembers",string);
					dUserSetINT(PlayerName2(player1)).("7L",(level));
					PlayerInfo[player1][7L] = level;
					return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
				} else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be set as a 7L member");
			} else return SendClientMessage(playerid, red, "Player is not connected");
		} else return SendClientMessage(playerid,red,"ERROR: you do not have the privilegie to set 7L's");
	} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
//7L PRIVATE CHAT
	forward MessageTo7L(color,const string[]);
	public MessageTo7L(color,const string[])
	{
	    for(new i = 0; i < MAX_PLAYERS; i++)
	    {
	        if(IsPlayerConnected(i) == 1)
	        if(PlayerInfo[i][7L] >= 1) {
			if(PlayerInfo[i][LoggedIn] == 1) {
	        SendClientMessage(i, color, string); }
	    }
	  }
	}
	CMD:7l(playerid,params[]) {
	    #pragma unused params
	 	if(PlayerInfo[playerid][LoggedIn] == 1) {
	  	if(PlayerInfo[playerid][7L] >= 1) {
	        new string[128]; format(string, sizeof(string), "[7L] %s: %s", PlayerName2(playerid), params[0] );
	        MessageTo7L(COLOR_GREEN,string);
	    } else return SendClientMessage(playerid,red,"ERROR: You need to be 7L Member to use this command");
	    } else return SendClientMessage(playerid,red,"ERROR: You need to be Logged in to use this command");
	    return 1;
	}
	CMD:7lh(playerid,params[]) {
    if(PlayerInfo[playerid][7L] >= 1) {
    	new string[128]; format(string, sizeof(string), "7L Member: %s is requesting help!!! ", PlayerName2(playerid), params[0] );
	    MessageTo7L(red,string);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be a 7L member to use this command");
    return 1;
}
Reply
#2

you cant place 7 it get 4 errors delete 7 and put seven it will work
Reply
#3

You need to define 7L
Reply
#4

bro 7 is a sing its place 4 errors dont define you will get 6 errors just rename 7 with seven
Reply
#5

a variable should start with a letter (_ is accepted as letter) not a digit 7L is an invalid name
Reply
#6

Whats the ERROR ?
Reply
#7

musah dont spam you see
Reply
#8

English..
Just simply replace "7" With seven at the commands
Example:
PHP код:
CMD:7lhelp(playerid,params[]) {
CMD:sevenhelp(playerid,params[]){ 
Reply
#9

thank you alot guys for ideas
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)