123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|690|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> On Topic -> Play MyCode: problems with arrays.

Fri, 23 Nov 2012, 06:28
steve_ancell
I also posted this on the PMC forum, I've just been playing around with arrays but the code below will only index the first array entry.



Fri, 23 Nov 2012, 08:56
CodersRule
I'm not very experienced with either Ruby or Quby, but I think the problem is that on your fillText line, you're using array1[i].

In "array1.each() do |i|", i refers to the actual array element instead of the index of the element. Instead of using array1[i] on the fillText line, you should only be using i.

edit: derp bbcode italics
Fri, 23 Nov 2012, 11:39
steve_ancell
It got solved a few hours ago and yes, it was exactly what you just suggested. Bloomin' embarassment though considering I've used arrays in loads of other programming lingos.
Fri, 23 Nov 2012, 11:41
steve_ancell
Here's how it should be.