View Issue Details

IDProjectCategoryView StatusLast Update
0004931Spring engineLuapublic2016-02-05 16:29
ReporterGoogle_Frog Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version100.0 
Summary0004931: CustomCmd does not draw if it has too many params.
DescriptionI 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.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

silentwings

2015-08-12 15:52

reporter   ~0015062

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

2015-08-12 17:16

reporter   ~0015063

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

2016-02-05 16:29

viewer   ~0015628

Fix d67ac65ee9b5eb2c1bfb204d838cac9311922025 committed to develop branch: fix 0004931, repo: spring changeset id: 6539

Issue History

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
2015-08-12 15:54 silentwings Note Edited: 0015062
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