| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
|---|---|---|---|---|---|---|---|---|---|
| 0004023 | Spring engine | Lua | public | 2013-10-05 02:12 | 2013-10-05 12:46 | ||||
| Reporter | jamerlan | ||||||||
| Assigned To | Kloot | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | resolved | Resolution | fixed | ||||||
| Product Version | 94.1 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0004023: is it possible to pass options fom callin parameter to command? | ||||||||
| Description | I am trying to pass options object from "function widget:CommandNotify(id, params, options)" to "spGiveOrderToUnit(unit_id, id, params, options)" and it does not work. options are ignored but code like that works: if(options.shift == true) then spGiveOrderToUnit(unit_id, id, params, {"shift"}) else Looks like I need to convert options from parameter to options for command. Why? Is it true? Which is the best or simplest way to convert? I think Spring.GiveOrderToUnit should understand options from widget:CommandNotify(id, params, options) | ||||||||
| Additional Information | I attached widget that helps to debug. Just enable it and try to give some orders to factory. | ||||||||
| Tags | No tags attached. | ||||||||
| Checked infolog.txt for Errors | |||||||||
| Attached Files |
| ||||||||
Notes |
|
|
jamerlan (reporter) 2013-10-05 02:50 |
CarRepairer and [LCC]Pako showed me the best way how to do that: for option, enabled in pairs(options) do if enabled then options2[#options2+1] = tostring(option) end end but still I think it's very frustrating that engine don't understands own options |
Issue History |
|||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-10-05 02:12 | jamerlan | New Issue | |
| 2013-10-05 02:12 | jamerlan | File Added: unit_obedient_constructors.lua | |
| 2013-10-05 02:50 | jamerlan | Note Added: 0011677 | |
| 2013-10-05 12:46 | Kloot | Changeset attached | => spring develop 2e19dae1 |
| 2013-10-05 12:46 | Kloot | Assigned To | => Kloot |
| 2013-10-05 12:46 | Kloot | Status | new => resolved |
| 2013-10-05 12:46 | Kloot | Resolution | open => fixed |


