get random text from array

Get help using Construct 2

Post » Fri Jul 27, 2012 8:52 am

Hi guys,

I can't seem to get the stored text from an array by using the code below:

arrayBusiness.At(int(random(3)))

It just shows '0'

This is probably an easy one, can anyone help me please?

Regards,


SPX
B
9
S
3
G
4
Posts: 8
Reputation: 2,596

Post » Fri Jul 27, 2012 11:16 am

Example capx

If a returned value from the array is "0", it means you are probably trying to get values out of the bounds of the array or a not filled cell.Kyatric2012-07-27 11:17:29
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Fri Jul 27, 2012 3:03 pm

Thanks, that helped!
B
9
S
3
G
4
Posts: 8
Reputation: 2,596


Return to How do I....?

Who is online

Users browsing this forum: varr, Yahoo [Bot] and 5 guests