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
BioWolf  
#1 Posted : Thursday, September 10, 2020 1:24:16 AM(UTC)
BioWolf

Rank: Newbie

Groups: Registered
Joined: 9/10/2020(UTC)
Posts: 1
Romania
Location: Bucharest

Hello, I have a problem with scripting.
I want to change the score for a basketball game in .gtzip and the script gives me an error, but for .xaml I have no problems...

The script for .xaml is:

dim i = Input.Find("ScorMic.xaml")
dim s = Convert.ToInt16(i.Text("ScorGazde"))
s=s+3
i.Text("ScorGazde") = Convert.ToString(s)

And for .gtzip is:

dim i = Input.Find("ScorMic.gtzip")
dim s = Convert.ToInt16(i.Text("ScorGazde"))
s=s+3
i.Text("ScorGazde") = Convert.ToString(s)

I get this error:
Script '+3S' Error Line 2: Input string was not in a correct format.

xaver  
#2 Posted : Thursday, September 10, 2020 2:18:26 AM(UTC)
xaver

Rank: Advanced Member

Groups: Registered
Joined: 11/11/2016(UTC)
Posts: 378
Man
Location: Europe

Thanks: 23 times
Was thanked: 38 time(s) in 32 post(s)
it seems (i.Text("ScorGazde")) is '+3S'
you can't convert it to interger without a special function
doggy  
#3 Posted : Thursday, September 10, 2020 2:43:22 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,223
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
You need to put .Text to the textblock name to match it with the one your are changing (ScorGazde.Text)

but why use a script in the first place and not a simple shortcut that adds 3 points with a SetText +=3 value
Users browsing this topic
Guest
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.