A solution exist in JSFX to fill an array from a string? I tried this code with no success:
Code:
@init
arr_max=33;
arr=0;
function splitString(str)
local(i,pos) (
i=0;
pos=0;
while (pos<strlen(str)) (
arr[i]=strcpy_substr(#,str,pos,2);
pos+=2;
i+=1;
);
);
@gfx 100 10
gfx_r=gfx_g=gfx_b=1;
gfx_x=gfx_y=3;
i=0;
while (i<=arr_max ?
arr[i] ? (
#arr = sprintf(#, "%d", i);
#arr+="=>";
#arr+= arr[i];
#arr+=" ";
gfx_drawstr(#arr);
gfx_x=3;
gfx_y+=gfx_texth+1;
);
i+=1;
);