[Help] Command
#1

Код:
	if(strcmp(cmd, "/Clan",true)== 0)
	{
    tmp = strtok(cmdtext, idx);
    
    	if(strcmp(tmp, "Create", true) == 0)
  	{
      if(PlayerInfo[playerid][Admin] < 20) return DenyMessage(playerid, 20);
      tmp = strtok(cmdtext, idx);
			new name[MAX_PLAYER_NAME], opname[MAX_PLAYER_NAME];
			new string[256], file[256];
			new ClanName[60];
		  ClanName = strval(tmp);
			tmp3 = strtok(cmdtext, idx);
			new otherplayer = strval(tmp3);
			GetPlayerName(playerid, name, sizeof(name));
			GetPlayerName(otherplayer, opname, sizeof(opname));
			format(file, sizeof(file), "DAR/Clans/%s.txt", ClanName);
			if(dini_Exists(file)) return SCM(playerid, RED, ".дчмап бщн жд лбш чййн");
			for (new i = 0; i < MAX_PLAYERS; i++)
			{
				if(i != otherplayer)
				{
					format(string, sizeof(string), ".ммйгш дшащй %s едфк %s фъз аъ дчмап %s дагойп", opname, ClanName, name);
					SCM(i, ORANGE, string);
				}
			}
			format(string, sizeof(string),".едфк аеък ммйгш дшащй $s фъз аъ дчмап %s дагойп", ClanName, name);
			SCM(otherplayer, ORANGE, string);
			dini_Create(file);
			dini_Set(file, "Founder", opname);
			dini_FloatSet(file, "X", 0);
			dini_FloatSet(file, "Y", 0);
			dini_FloatSet(file, "Z", 0);
			dini_IntSet(file, "ClanBank", 0);
			SCM(otherplayer, ORANGE, "./ClanHelp - мтжшд дчмг/й");
			new file2[256];
			format(file2, sizeof(file2), "DAR/Users/%s.txt", opname);
			dini_Set(file2, "Clan", ClanName);
			dini_IntSet(file2, "LeaderLevel", 4);
			PlayerInfo[otherplayer][Leaderlvl] = 4;
    }
		return 1;
	}
the Error is:
error 033: array must be indexed (variable "ClanName")
on line ClanName = strval(tmp);

how can i fix this?
Reply
#2

Edit it to
Код:
format(ClanName,60,tmp);
Reply
#3

thx, solved.
Reply
#4

please edit "[Help]" to "[Solved]", thx^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)