View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004931 | Spring engine | Lua | public | 2015-08-11 16:07 | 2016-02-05 16:29 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 100.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004931: CustomCmd does not draw if it has too many params. | ||||||||
Description | I registered a command with type CMDTYPE.ICON_UNIT. Then I made a widget send the command to a unit and I gave it two parameters. The first parameter is intended as a unitID and the second is extra information which is used in CommandFallback. Unfortunately the command did not draw. If I remove the second parameter then the command draws correctly. There is a check in the engine which will only draw a command tagetting a unit if the command has exactly 1 parameter. This is a needless limitation so the check should be changed to at least 1 parameter. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
silentwings (reporter) 2015-08-12 15:52 Last edited: 2015-08-12 15:54 |
It's not a needless limitation, for example I have written code before (to colour GUI text) that identifies information about the CMDTYPE using the number of params recieved & various other info. But I agree that it would be nice to have a way to pass info around with custom commands. |
Google_Frog (reporter) 2015-08-12 17:16 |
You should not have to count params to figure out the type of a custom command. If you need to know the type then put it in as an extra param. I ended up having to create two commands. The first contains all the useful information. The second one just sits in the command queue after the first and exists only to draw the command. |
Anonymous (viewer) 2016-02-05 16:29 |
Fix d67ac65ee9b5eb2c1bfb204d838cac9311922025 committed to develop branch: fix 0004931, repo: spring changeset id: 6539 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-08-11 16:07 | Google_Frog | New Issue | |
2015-08-12 15:52 | silentwings | Note Added: 0015062 | |
2015-08-12 15:52 | silentwings | Note Edited: 0015062 | View Revisions |
2015-08-12 15:54 | silentwings | Note Edited: 0015062 | View Revisions |
2015-08-12 17:16 | Google_Frog | Note Added: 0015063 | |
2016-02-05 16:29 | Changeset attached | => spring develop d67ac65e | |
2016-02-05 16:29 | Anonymous | Note Added: 0015628 | |
2016-02-05 16:29 | Anonymous | Status | new => resolved |
2016-02-05 16:29 | Anonymous | Resolution | open => fixed |