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
8
S
3
G
4
Posts: 8
Reputation: 2,544

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
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Fri Jul 27, 2012 3:03 pm

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


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, randomly, spcsmrf and 18 guests