Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • You could do it with eval() but it'd be quite hacky. The array thing seems your best bet, I'd say go with it. Commented Jun 8, 2012 at 19:30
  • 9
    don't use eval(), never. Commented Jun 8, 2012 at 19:31
  • 2
    Storing all monsters in an array is a perfectly fine solution. Commented Jun 8, 2012 at 19:33
  • @OZ_ That's why I said it'd be quite hacky. Commented Jun 8, 2012 at 19:36
  • 1
    @OZ_ Classical cargo cult programming. If you never use the one feature that differentiates scripting from compiled languages, you're doing something seriously wrong. Meme coding and not understanding use cases (right tool for the right job) isn't overly professional. Commented Jun 8, 2012 at 19:43