Creating new line on textdraw
#5

meeh, i don't really like to deal with arrays that much

But here is what i got

Код:
	    new Texts[5];
	    new linecount;
	    new String[128];
		if(sscanf(params,"s",Texts)) return SendClientMessage(playerid,0xBFC0C2FF,"USAGE: /Setnews < News >");
		for(new i = 0; i < linecount; i ++)
		{
		    Texts[5] = Texts[4];
		    Texts[4] = Texts[3];
		    Texts[3] = Texts[2];
		    Texts[2] = Texts[1];
		    Texts[1] = Texts[5];
		    linecount = 1;
		    format(String,sizeof(String),"%s~n~%s",String,Texts[i]);
			TextDrawSetString(NewsText,String);
		}
I get two out of bound index erros

Lines 1st error - Texts[5] = Texts[4];
2nd error - Texts[1] = Texts[5];
Reply


Messages In This Thread
Creating new line on textdraw - by [L3th4l] - 09.07.2010, 21:25
Re: Creating new line on textdraw - by Kar - 09.07.2010, 21:28
Re: Creating new line on textdraw - by [L3th4l] - 09.07.2010, 21:32
Re: Creating new line on textdraw - by Mauzen - 09.07.2010, 21:36
Re: Creating new line on textdraw - by [L3th4l] - 09.07.2010, 22:14
Re: Creating new line on textdraw - by [L3th4l] - 10.07.2010, 15:44
Re: Creating new line on textdraw - by [HUN]Jaki - 11.07.2010, 19:52
Re: Creating new line on textdraw - by hab2ever - 11.07.2010, 19:58

Forum Jump:


Users browsing this thread: 1 Guest(s)