View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005373 | Spring engine | Lua | public | 2016-10-15 12:12 | 2017-05-01 09:55 |
| Reporter | StickyStains | Assigned To | Kloot | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 103.0 | ||||
| Summary | 0005373: Script loading error | ||||
| Description | I have two units, the jgeohive and the gzombspawner. Both load the same script jgeohive.lua. Both units have identical UnitDefs,except for the models. On load, the jgeohive will perfectly execute the script, the gzombspawner will refuse to load/run the script. (Create is not reached) This doesnt seem to apply if the scripts are named diffently, aka are not having a UnitsName. | ||||
| Additional Information | Infolog at: http://pastebin.com/i6M0KxS1 | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
https://github.com/spring/spring/blob/develop/cont/base/springcontent/LuaGadgets/Gadgets/unit_script.lua#L545 https://github.com/spring/spring/blob/develop/cont/base/springcontent/LuaGadgets/Gadgets/unit_script.lua#L513 script chunks are cached by unitDef.scriptName, i.e. only loaded once. |
|
|
the chunks are loaded once, but that's not the report. Create should run in both units https://github.com/spring/spring/blob/develop/cont/base/springcontent/LuaGadgets/Gadgets/unit_script.lua#L792 as it does in S44 (which has a similar unit_script.lua) |
|
|
it's at least half the report, if "the gzombspawner will refuse to load" and "doesnt seem to apply if the scripts are named diffently" are taken literally. regardless, hacking two ZK unitdefs to reference the same script containing just function script.Create() print("unitID=" .. unitID) end did not reproduce the no-Create part for me (with either base-content or ZK's version of unit_script) and I have no inclination to dive deeper. |
|
|
I agree, without code this is useless |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-10-15 12:12 | StickyStains | New Issue | |
| 2017-05-01 00:05 | Kloot | Assigned To | => Kloot |
| 2017-05-01 00:05 | Kloot | Status | new => closed |
| 2017-05-01 00:05 | Kloot | Resolution | open => no change required |
| 2017-05-01 00:05 | Kloot | Note Added: 0017547 | |
| 2017-05-01 00:11 | hokomoko | Note Added: 0017548 | |
| 2017-05-01 01:11 | Kloot | Note Added: 0017549 | |
| 2017-05-01 01:14 | Kloot | Note Edited: 0017549 | |
| 2017-05-01 09:55 | hokomoko | Note Added: 0017550 |