Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Action value" doesn't detect actions from "else-if" section #1150

Open
MinecraftNight4 opened this issue Jul 1, 2024 · 1 comment
Open

Comments

@MinecraftNight4
Copy link

Version information:

  • OS: Windows 10
  • OBS Version 30.1.2
  • Plugin Version 1.26.4

Context:
I was trying to do something to refresh a token in case this one expires, but I noticed that "else-if" actions are not detected for variables.

In case there request doesn't responses with an error, the macro sends a message to Twitch Chat.
But in case there is an error, the macro refresh the token and executes the whole macro again knowing that the request will work with the refreshed token.

Example macro:
image

{"macros":[{"name":"Macro 2","pause":true,"parallel":false,"onChange":true,"skipExecOnStart":false,"stopActionsIfNotDone":false,"group":false,"dockSettings":{"register":false,"hasRunButton":true,"hasPauseButton":true,"hasStatusLabel":false,"highlightIfConditionsTrue":false,"runButtonText":"Run","pauseButtonText":"Pause","unpauseButtonText":"Unpause","conditionsTrueStatusText":"Conditions are true.","conditionsFalseStatusText":"Conditions are false."},"macroActionConditionSplitterPosition":[],"macroElseActionSplitterPosition":[],"registerHotkeys":false,"pauseHotkey":[],"unpauseHotkey":[],"togglePauseHotkey":[],"conditions":[{"segmentSettings":{"collapsed":true,"useCustomLabel":false,"customLabel":"My label"},"id":"timer","logic":0,"durationModifier":{"time_constraint":0,"seconds":{"value":{"value":0.0,"type":0},"unit":0,"version":1}},"type":0,"duration":{"value":{"value":5.0,"type":0},"unit":0,"version":1},"duration2":{"value":{"value":0.0,"type":0},"unit":0,"version":1},"remaining":5.0,"saveRemaining":false,"paused":false,"oneshot":false,"version":1}],"actions":[{"segmentSettings":{"collapsed":true,"useCustomLabel":false,"customLabel":"My label"},"id":"http","enabled":true,"url":"google.com","data":"--ingresar texto--","setHeaders":false,"headers":[],"method":0,"duration":{"value":{"value":1.0,"type":0},"unit":0,"version":1}},{"segmentSettings":{"collapsed":true,"useCustomLabel":false,"customLabel":"My label"},"id":"variable","enabled":true,"variableName":"test","variable2Name":"Invalid varialbe selection","strValue":"","numValue":0.0,"condition":6,"segmentIdx":0,"subStringStart":0,"subStringSize":0,"regexPattern":".*","regexMatchIdx":0,"findRegex":{"enable":false,"partial":false,"options":0},"findStr":"Text to find","replaceStr":"Text to replace with","regexConfig":{"enable":false,"partial":true,"options":0},"mathExpression":"( 1 + 2 * 3 ) / 4","useCustomPrompt":false,"inputPrompt":"Assign value to variable:","useInputPlaceholder":false,"inputPlaceholder":"--ingresar texto--","environmentVariableName":"USERPROFILE","sceneSelection":{"type":0,"name":""},"tempVar":{"type":0,"idx":-1,"id":""},"sceneItemIndex":{"value":1,"type":0},"direction":0,"stringLength":{"value":1,"type":0},"paddingChar":48}],"elseActions":[{"segmentSettings":{"collapsed":true,"useCustomLabel":false,"customLabel":"My label"},"id":"http","enabled":true,"url":"twitch.tv","data":"--ingresar texto--","setHeaders":false,"headers":[],"method":0,"duration":{"value":{"value":5.0,"type":0},"unit":0,"version":1}},{"segmentSettings":{"collapsed":false,"useCustomLabel":false,"customLabel":"My label"},"id":"variable","enabled":true,"variableName":"Invalid varialbe selection","variable2Name":"Invalid varialbe selection","strValue":"","numValue":0.0,"condition":6,"segmentIdx":-1,"subStringStart":0,"subStringSize":0,"regexPattern":".*","regexMatchIdx":0,"findRegex":{"enable":false,"partial":false,"options":0},"findStr":"Text to find","replaceStr":"Text to replace with","regexConfig":{"enable":false,"partial":true,"options":0},"mathExpression":"( 1 + 2 * 3 ) / 4","useCustomPrompt":false,"inputPrompt":"Assign value to variable:","useInputPlaceholder":false,"inputPlaceholder":"--ingresar texto--","environmentVariableName":"USERPROFILE","sceneSelection":{"type":0,"name":""},"tempVar":{"type":0,"idx":-1,"id":""},"sceneItemIndex":{"value":1,"type":0},"direction":0,"stringLength":{"value":1,"type":0},"paddingChar":48}],"inputVariables":[]}],"variables":[{}],"actionQueues":[],"version":"1.26.4"}
@MinecraftNight4
Copy link
Author

I have a way to fix this, i'll make a macro dedicated to run the "else-if" stuff.
But I wanted to know if this wasn't an issue or something.

In case this is intencional, just close the issue o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant