09.07.2010, 22:14
meeh, i don't really like to deal with arrays that much
But here is what i got
I get two out of bound index erros
Lines 1st error - Texts[5] = Texts[4];
2nd error - Texts[1] = Texts[5];
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); }
Lines 1st error - Texts[5] = Texts[4];
2nd error - Texts[1] = Texts[5];