Sarven Shepherd - Array documentation


Hello and thank you for such a great game!

I’m fairly new to Lua, so I have a problem figuring out arrays.

When you hover over arrays it says I can check “Mozilla’s array documentation” for more info.
I just don’t know where to find that.

My problem is that I don’t know how to do the while loop in Sarven Shepherd. I searched about and found people checking for the array’s length.

Can someone give me some documentation on arrays for Lua?

I’m not looking for the solution. That’s cheating. I just want to find out about arrays.



Alright, I guess there is no such thing as a Lua array documentation. Can I get some sort of hint or solution on how to do this while loop?

EDIT: Alright, so I just did it without the while loop which was much easier.

Still looking for some array documentation though.


Well, the problem here is that the item descriptions are programming language-agnostic.

Mozilla (or, more specifically, the Mozilla Developer Network) contains documentation for JavaScript arrays only. The same description will be shown independent of the programming language you’re using, which makes little sense when you are coding in Python or Lua. There’s a related bug ticket.

Another issue is that links inside descriptions seem to be not reachable (at least in desktop computers), as the description will be closed immediately after the cursor leaves the item they are describing. I’ve reported this issue here.

Anyway, for the time being, you can search on Google to find the relevant documentation for your programming language. Here’s the Lua Arrays documentation.