Rank: Member
Groups: Registered
Joined: 8/4/2020(UTC) Posts: 16 Location: Mumbai Thanks: 16 times Was thanked: 4 time(s) in 2 post(s)
|
Hi, I'm getting Error " Statements and labels are not valid between 'Select Case' and first 'Case'" when trying scripting with "Select Case" command in vMix Script Code:dim strTest as string = "B"
Select Case strTest
Case "A"
Console.WriteLine("Character is A")
Case "B"
Console.WriteLine("Character is B")
End Select
Please let me know the proper sytnax for Select Case statements in vMix Thanks in Advance
|
|
|
|
Rank: Member
Groups: Registered
Joined: 2/19/2015(UTC) Posts: 14 Location: Östersund, Sweden
Thanks: 2 times
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 6/16/2020(UTC) Posts: 77 Thanks: 8 times Was thanked: 2 time(s) in 2 post(s)
|
Greetings, I have not been able to do it but if it is only that you can use the if else or the switch or choose or try to put all the visual basic namespace ..... maybe the select word is a command exclusively used for vmix , it can be the same if you put vmix inside the script as the name of a variable for example .... this should be clarified ..... mmmm translated from spanish to english
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/4/2020(UTC) Posts: 16 Location: Mumbai Thanks: 16 times Was thanked: 4 time(s) in 2 post(s)
|
I have been using else if for my script, but the language of the error sounded like there was a syntax problem.
If anyone has any details please clarify
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,219 Location: Belgium Thanks: 292 times Was thanked: 955 time(s) in 790 post(s)
|
As of 24.0.0.59 Select Case is usable warning though: Can not "style" the code, need to remove spacing before each "Case"! (Edit: for now) Code:dim strTest as string = "B"
Select Case strTest
Case "A"
Console.WriteLine("Character is A")
Case "B"
Console.WriteLine("Character is B")
End Select
Tnx Martin for the usability be it with a little bit to consider
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 8/4/2020(UTC) Posts: 16 Location: Mumbai Thanks: 16 times Was thanked: 4 time(s) in 2 post(s)
|
Thanks for the clarification, I was getting error even after updating. Did not know what was wrong.
Thanks for your help
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close