View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004932 | Spring engine | General | public | 2015-08-12 13:03 | 2016-01-20 20:15 | ||||
Reporter | silentwings | ||||||||
Assigned To | gajop | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 100.0+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004932: unitDef:pairs() and weaponDef:pairs() gives warnings/errors about non-existent tags | ||||||||
Description | iterating with unitDef:pairs() or weaponDef:pairs() gives warnings/errors about tags that are not present in the unit/weapon def files. | ||||||||
Steps To Reproduce | E.g. With bar-test, give a corcom, and use the code below (which I wrote to make example defs for the wiki - without copying the table first it can't be handled by table.save). It will give the following errors, all of which refer to tags that are not present in the unit/weapon def files. [f=0011278] writing example unit def [f=0011278] Warning: [ReturnFalse] builder - deprecated field! [f=0011278] Warning: [ReturnFalse] canCrash - deprecated field! [f=0011278] Warning: [ReturnFalse] canDGun - deprecated field! [f=0011278] Error: [UnitDefIndex] ERROR_TYPE for key "canHover" in UnitDefs __index [f=0011278] Error: [UnitDefIndex] ERROR_TYPE for key "drag" in UnitDefs __index [f=0011278] Error: [UnitDefIndex] ERROR_TYPE for key "extractSquare" in UnitDefs __index [f=0011278] Warning: [ReturnFalse] floater - deprecated field! [f=0011278] Warning: [ReturnFalse] isCommander - deprecated field! [f=0011278] Warning: [ReturnMinusOne] maxSlope - deprecated field! [f=0011278] Warning: [ReturnNil] moveData - deprecated field! [f=0011278] Warning: [ReturnEmptyString] type - deprecated field! [f=0011278] writing example weapon def [f=0011278] Error: [WeaponDefIndex] ERROR_TYPE for key "areaOfEffect" in WeaponDefs __index [f=0011278] Error: [WeaponDefIndex] ERROR_TYPE for key "maxVelocity" in WeaponDefs __index [f=0011278] Error: [WeaponDefIndex] ERROR_TYPE for key "onlyTargetCategories" in WeaponDefs __index [f=0011278] Error: [WeaponDefIndex] ERROR_TYPE for key "restTime" in WeaponDefs __index | ||||||||
Additional Information | function widget:UnitCreated(unitID, unitDefID, unitTeam, builderID) local unitDef = UnitDefs[unitDefID] local t = {} for k,v in unitDef:pairs() do t[k] = v end table.save(t, "lua_unitDef_" .. unitDef.name .. ".lua", "-- generated by table.save") if #unitDef.weapons==0 then return end local weaponDef = WeaponDefs[unitDef.weapons[1].weaponDef] local s = {} for k,v in weaponDef:pairs() do s[k] = v end table.save(s, "lua_weaponDef_" .. weaponDef.name .. ".lua", "-- generated by table.save") end | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
gajop (developer) 2016-01-20 20:15 |
Fix cd9a4c6d4e66e97ad4745581279bf4b501c1fdfc committed to develop branch: fix 0004932, repo: spring changeset id: 6342 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-08-12 13:03 | silentwings | New Issue | |
2016-01-20 20:15 | gajop | Changeset attached | => spring develop cd9a4c6d |
2016-01-20 20:15 | gajop | Note Added: 0015549 | |
2016-01-20 20:15 | gajop | Assigned To | => gajop |
2016-01-20 20:15 | gajop | Status | new => resolved |
2016-01-20 20:15 | gajop | Resolution | open => fixed |