#(maatze) Choose Case broken?

15 messages · Page 1 of 1 (latest)

gaunt heart
#

i ran into the problem that this choose case always go into default, so it's not hitting the right answer.

the yellow marked flag (create_guild.guild_color) is <item[white_banner]>.
If i do it in an if-else, it works.
If i type a raw object notation in the case, it also works.

Did i ran into a bug, or what am i doing wrong? 😅

echo spireBOT
#

(maatze) Choose Case broken?

echo spireBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

gaunt heart
#

well the "false"/fallback didnt get filled out btw, also tested that.
the flag is for sure the <item[white_banner]>

fluid cargo
#

!f choose

tropic gobletBOT
# fluid cargo !f choose
Search Results

[Perfect Name Match] !Command choose,
[Partial Name Match] !Event player chooses arrow,
[Semi-Decent Match] !Command log, !Command yaml, !Command random, !Command run, !Command customevent, !Command clientrun, !Command createworld, !Language flag system, !Language tag fallbacks, !Language particle effects, !Language item script containers, !Tag elementtag.color_gradient, !Language script event after vs on, !Language player entity skins (skin blobs).

fluid cargo
#

!c choose

tropic gobletBOT
# fluid cargo !c choose
Group

queue

Syntax

choose [<option>] [<cases>]

Short Description

Chooses an option from the list of cases.

Description

Chooses an option from the list of cases.
Intended to replace a long chain of simplistic if/else if or complicated script path selection systems.
Simply input the selected option, and the system will automatically jump to the most relevant case input.
Cases are given as a sub-set of commands inside the current command (see Usage for samples).

Optionally, specify "default" in place of a case to give a result when all other cases fail to match.

Cases must be static text. They may not contain tag...

fluid cargo
#

Cases must be static text. They may not contain tags. For multi-tag comparison, consider the IF command.

#

^ See the meta :p

gaunt heart
#

ah damn, is there another way except if/else?
if else is ugly 😦

fluid cargo
#

Could you explain what are you trying to do there? there might be a cleaner way to write this overall

gaunt heart
#

in the flag is a banneritem.
could be a white one, black one, red one, etc..

i just wanna define the banner by Display & color, if the flag is set 😄
Every color got a custom display_name.

Well just got a solution in mind:
set another flag like "create_guild.guildcolor_txt:<displayname here>" & adjust it to the def if the flag is set

#

well i'll run in an if-else eitherway.
Nvm, got it to work.

Thanks for the help c: