2025-07-21 13:17 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004023Spring engineLuapublic2013-10-05 12:46
Reporterjamerlan 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version94.1 
Target VersionFixed in Version 
Summary0004023: is it possible to pass options fom callin parameter to command?
DescriptionI 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 InformationI attached widget that helps to debug.

Just enable it and try to give some orders to factory.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0011677

jamerlan (reporter)

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
+Notes

-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
+Issue History