Array comparing value at X

Discussion and feedback on Construct 2

Post » Fri Feb 07, 2014 9:09 pm

I'm getting wome weird results when trying to compare a value, check the image below:

I log value at 0 in my array, it returns "2", right after i check if that same value array.at(0) equals 2 and it returns false.
Am I missing something? It all happens on start of layout
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Fri Feb 07, 2014 9:52 pm

Got it solved, array.at(0) was returning a string and not an integer. Casting solved the problem.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to Construct 2 General

Who is online

Users browsing this forum: whitephon and 12 guests