question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Variables not working on Selector action

See original GitHub issue

Hi, I have recently upgraded the magic plugin from an older version and, as expected, some spells needed some fixing and most of them are okay, but I think I found a common error on my config when reloading that I don’t understand why it worked before, but now it does not.

I used to have several selectors inherit from one that acts as a base for the rest, so I just have to change a few slots in parameters section in the inherit ones, and they will be good to go. I made a simpler example - which may not have sense in a minecraft server, it’s just made up, so you can see the behavior I am talking about.

missile_menu:
  icon: book
  actions:
    cast:
    - class: Selector
      options:
      - cast_spell: $opt
        name: $opt_name
        slot: 4
        cost: 1
  parameters:
    target: self
    title: Cast a Missile
    opt_name: "&3Do you want to cast a missile?"
    opt: missile

heal_menu:
  inherit: missile_menu
  parameters:
    title: Cast a healing speel
    opt_name: "&3Do you wan to cast a healing speel?"
    opt: heal

Those spells work on older versions (in this example version 8.7.1).

selector with variables version 8

But they do not work on 10.8.3

selector with variables version 10

Is it a bug? Or was that discontinued for a reason? It could be intentional like if it was not working for different game versions or so. If it was not a wanted/intentional change/feature, could it come back?

Also, thank you in advance.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
NathanWolfcommented, Oct 12, 2022

The bug and fix were not specific to selectors, but the $ parameters in general.

Please let me know if you continue to see these problems on 10.8.4

1reaction
NathanWolfcommented, Oct 5, 2022

I do recall making some changes to how this parameterization stuff works… I think what you’re seeing is a bug, I doubt it was an intentional change but it may have gotten dropped accidentally.

I will look into it when I can, my hope is it’s something I can bring back easily.

Read more comments on GitHub >

github_iconTop Results From Across the Web

state overwritten: useSelector variable not getting updated ...
A component's useSelector value is not updated when an action is fired from a utility function that changes that state. The action that...
Read more >
Using Selectors as variables with addTarget - Stack Overflow
How can I supply the action with a Selector that is not a string literal, but instead stored in a variable? swift.
Read more >
Difficulties with selectors and variables - Help - UiPath Forum
Hi, I want to select an item from a dropdown menu but it does not work. I can open the dropdown menu with...
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
There are two main reasons: you can't apply two isolated scope directives to an element, and you may encounter issues with nesting /...
Read more >
Script Syntax - Home Assistant
The variables action allows you to set/override variables that will be ... When a condition does not return true , the script will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found