Array value that hasn't been set?

Get help using Construct 2

Post » Sun Jul 13, 2014 8:43 pm

I have an array built using AJAX and CSV2ARRAY plugin.
Example data:

Carrot, Juice
Banana
Apple, Sauce
Peanut
Lemon
Coconut, Chocolate

Row 0 has X and Y but Row 1 does not have a Y value.
0, 0 = "Carrot"
0, 1 = "Juice"
and
1, 0 = "Banana"

What is 1, 1?
Does
1, 1 = ""
Or
1, 1 = 0
?

I want to create an If/Else using the data...
If Current.Y != "" Then Create 2 small objects for text display evenly spaced.
Else Create 1 large object for text display centered.

If I have never assigned data to an Array cell should I use "" to check for an empty cell?

Thanks!
B
10
S
4
G
2
Posts: 133
Reputation: 2,667

Post » Sun Jul 13, 2014 9:22 pm

all unused arrays are set to 0
ImageImageImageImageImage
B
57
S
16
G
5
Posts: 852
Reputation: 11,536


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 31 guests