logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ron2210  
#1 Posted : Wednesday, December 16, 2020 4:25:30 AM(UTC)
ron2210

Rank: Member

Groups: Registered
Joined: 8/4/2020(UTC)
Posts: 16
Man
India
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
Janne Adolfsson  
#2 Posted : Tuesday, January 12, 2021 12:06:06 AM(UTC)
Janne Adolfsson

Rank: Member

Groups: Registered
Joined: 2/19/2015(UTC)
Posts: 14
Location: Östersund, Sweden

Thanks: 2 times
I have the same issue.
Papo  
#3 Posted : Tuesday, January 12, 2021 11:34:50 AM(UTC)
Papo

Rank: Advanced Member

Groups: Registered
Joined: 6/16/2020(UTC)
Posts: 77
Peru

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
ron2210  
#4 Posted : Tuesday, January 12, 2021 1:32:00 PM(UTC)
ron2210

Rank: Member

Groups: Registered
Joined: 8/4/2020(UTC)
Posts: 16
Man
India
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
doggy  
#5 Posted : Friday, June 25, 2021 8:43:45 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,219
Belgium
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
thanks 1 user thanked doggy for this useful post.
ron2210 on 6/25/2021(UTC)
ron2210  
#6 Posted : Friday, June 25, 2021 9:08:36 PM(UTC)
ron2210

Rank: Member

Groups: Registered
Joined: 8/4/2020(UTC)
Posts: 16
Man
India
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
Users browsing this topic
Guest (4)
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.