String must be assigned to array
#1

Hi, im working on a ranking script and i want people to get a message when they rank up. However I don't know how to propperly use strings.

Код:
new newrank[MAX_PLAYERS];
new oldrank[MAX_PLAYERS];

        if (score[playerid] >= 300){
	    newrank[playerid] = "***Marshall***";
	}

        if(oldrank[playerid] != newrank[playerid]){
    	        format(stringb,sizeof(stringb),"~w~Rankup: ~g~%s",newrank[playerid]);
		GameTextForPlayer(playerid,stringb,2000,5);
	}
    oldrank[playerid] = newrank[playerid];
I left a lot of code out since it is not important for this question. but i get an error wich says that the array is not indexed. as you can see i indexed it to the playerid. please help
Reply


Messages In This Thread
String must be assigned to array - by klotebandit - 26.03.2013, 09:13
Re: String must be assigned to array - by Neil. - 26.03.2013, 09:16
Re: String must be assigned to array - by klotebandit - 26.03.2013, 09:20
Re: String must be assigned to array - by Neil. - 26.03.2013, 09:24
Re: String must be assigned to array - by Djole1337 - 26.03.2013, 09:26
Re: String must be assigned to array - by klotebandit - 26.03.2013, 09:27

Forum Jump:


Users browsing this thread: 1 Guest(s)