What I am trying to do is get some modoption sliders to adjust categories of units that are somewhat randomly spawned according to their weights. My current method spring dislikes, since my local defining on line 13 with the square brackets is bork. Spring also doen't like using that ugly name definition with the square brackets in the table's since I am trying to modify the tables with a simple name, later on..
Any suggestions from the savvy trick up their sleeve coders?
complicated local defining and making adjustable tables
Moderator: Moderators
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
complicated local defining and making adjustable tables
Last edited by bobthedinosaur on 01 Apr 2011, 15:05, edited 1 time in total.
Re: complicated local defining and making adjustable tables
1. use pastebin!
2. list of most obvious lua syntax errors:
remove the outer [] (why did you added them?)
note an error still `bad style`
why the "if" at the front?
2. list of most obvious lua syntax errors:
remove the outer [] (why did you added them?)
Code: Select all
local crate = [ UnitDefNames['crate'].id ]
Code: Select all
local gear = {}
gear = {...}
Code: Select all
if wdef = ( tonumber(Spring.GetModOptions().geardef) or 0 )