AJAX load slow help me to put in a next array

Get help using Construct 2

Post » Sat Dec 12, 2015 11:05 am

cat;rat;bat;|mat;foot;ban;|etc say this is the text file i use

tokenat(AJAX.LastData,i,"|")
arrayA now cat;rat;bat;
mat;foot;ban;
i get everything to load ok in the first array but it take up 12 second to load say 10 word on in each text obj
i am now trying to load every thing in a next array before loading them into the text obj to see if it will cut down on the loading time

with this code i can only load one row at a time in arrayB not efficient because i would need to write 100 line of the same code

cat,rat,bat
tokenat(ArrayB.At(var1),0,";")
add 1 to var1




one Dim (2,1) arrayA cell 1 cat;rat;bat;
cell2 mat;foot;ban;

how to iterate arrayA into arrayB to get without writing this 100 time tokenat(ArrayB.At(var1),0,";")

2 Dimension (2,3) arrayB cat,rat,bat
mat,foot,ban



tokenat(ArrayB.At(var1),0,";") = cat,rat,bat
tokenat(ArrayB.At(var1),1,";") = mat,foot,ban
tokenat(ArrayB.At(var1),2,";") = etc.......
B
9
S
2
Posts: 66
Reputation: 717

Post » Sat Dec 12, 2015 11:44 am

hothead wrote:tokenat(ArrayB.At(var1),0,";") = cat,rat,bat
tokenat(ArrayB.At(var1),1,";") = mat,foot,ban
tokenat(ArrayB.At(var1),2,";") = etc.......

probably you can use loop..
reapet X times...tokenat(ArrayB.At(var1),loopindex,";")
or another variable
...tokenat(ArrayB.At(var1),(var2),";")

it will be easier to answer if you upload capx...
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Dec 12, 2015 11:08 pm

it dont work but thanks i am just going do it the long way
i write this line 200 time hard and long my finger hurt
tokenat(tokenat(AJAX.LastData,i,"|"),200,";")
B
9
S
2
Posts: 66
Reputation: 717


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 8 guests