
`#wesnoth.unit_types` should simply return the number of unit types. This fixes the crash and reports the correct value: the number of unit types defined. This does not fix the rest of the crap like pairs() crawls, you can't interate variations or get the variation count. My knee-jerk reaction is to delete all scripting support for unit_types so that it's filed where it belongs: in the Trash. But, what the hell, nobody has complained about what utter shit this code is, so I'll just fix this so we don't crash and carry on working on getting the code to actually do what it's supposed to instead of the lame-ass shit it currently does. Can you tell what I think of this file? closes #2381
About
The Battle for Wesnoth is an Open Source, turn-based tactical strategy game with a high fantasy theme, featuring both singleplayer and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, or take hand in any number of other adventures.
License
Please see the wiki for information regarding The Battle for Wesnoth's licensing:
https://wiki.wesnoth.org/Wesnoth:Copyrights
Installing
See INSTALL for instructions on how to build the game from source code.
More Information
For extensive documentation about all aspects of the game, see the official Battle for Wesnoth web site.
A (translated) description of how to play the game can be found in doc/manual/manual.*.html, or online at:
https://wiki.wesnoth.org/WesnothManual
The official Battle for Wesnoth Forums (with over 400,000 posts from more than 20,000 registered members) can be found at: