View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005976 | Spring engine | General | public | 2018-05-08 17:08 | 2018-05-08 18:43 |
| Reporter | lhog | Assigned To | Kloot | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 104.0 +git | ||||
| Summary | 0005976: Something is wrong with math.random(lower, upper) | ||||
| Description | Testing on 104.0.1-287-gf7b0fcc maintenance and getting totally ridiculous error in the following minimal widget: function widget:GetInfo() return { name = "TEST RANDOM", enabled = true -- loaded by default? } end function widget:Initialize() Spring.Echo("HELLLOOO") Spring.Echo(math.random(-3000, 3000)) end Infolog: [f=0060843] HELLLOOO [f=0060843] [cawidgets.lua] Error: Error in Initialize(): [string "LuaUI/Widgets/precipitation_particles.lua"]:24: bad argument #2 to 'random' ([spring_lua_unsynced_rand(lower, upper)] empty interval) math.random(upperBound) or math.random() work just fine. | ||||
| Steps To Reproduce | Guess, test the widget code above on the 104.0.1-287-gf7b0fcc maintenance | ||||
| Additional Information | Noticed rain stopped working on Onyx Cauldron map and found this... | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-05-08 17:08 | lhog | New Issue | |
| 2018-05-08 18:41 | Kloot | Changeset attached | => spring develop e5979d12 |
| 2018-05-08 18:41 | Kloot | Note Added: 0019087 | |
| 2018-05-08 18:41 | Kloot | Assigned To | => Kloot |
| 2018-05-08 18:41 | Kloot | Status | new => resolved |
| 2018-05-08 18:41 | Kloot | Resolution | open => fixed |
| 2018-05-08 18:43 | Kloot | Changeset attached | => spring maintenance b0874231 |
| 2018-05-08 18:43 | Kloot | Note Added: 0019088 |