# "Set Variable" stopped working after upgrade 7 -\> 8

**URL:** <https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708>\
**Category:** Discussion\
**Tags:** finalbuilder\
**Created:** [January 29, 2020, 8:21pm UTC](https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708 "2020-01-29T20:21:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabr42](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/g/e36b37/32.png) [@gabr42](https://www.finalbuilder.com/forums/u/gabr42)\
**Post date:** [January 29, 2020, 8:21pm UTC](https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708/1 "2020-01-29T20:21:54Z")

</div>

We have a script which starts with the following:

1. PropertySet define [VersionNumber] (as Win32 Version Numbers)

2.PropertySet assign properties [VersionNumber] (assign BuildVersion = 0, MajorVersion = 2, MinorVerision = 9, ReleaseVersion = 3)

action.propertyset.setvalues  
begin  
id = {4FA8D4CD-B9DA-42A0-8A5D-07999922E247}  
propertysetname = VersionNumber  
setvaluesto = “” +  
“” +  
“0” +  
“” +  
“2” +  
“9” +  
“3” +  
“”  
valuestoset = “AutoUpdateFileVersionString=0” +  
“AutoUpdateProductVersionString=0” +  
“BuildVersion=-1” +  
“LinkProductVersion=0” +  
“MajorVersion=-1” +  
“MinorVersion=-1” +  
“ReleaseVersion=-1” +  
“”  
end

1. Set Variable VER\_MAJOR to [%VersionNumber.MajorVersion%]  
(VER\_MAJOR is a project variable of type Integer)

action.variable.set  
begin  
applytoexisting = false  
doexpandexpression = true  
forcetype = ftInteger  
id = {52C53498-911C-41DB-9A3E-688A0AA66F64}  
modifier = smNone  
newvalue = %VersionNumber.MajorVersion%  
variablename = VER\_MAJOR  
end

Execution fails at this step with:

Set Variable VER\_MAJOR to [2]  
Action Messages:  
Unable to Set Variable : VER\_MAJOR to : %VersionNumber.MajorVersion%  
‘’ is not a valid integer value

Although it reports correct number in the first line (2) it fails with ‘’ is not a valid integer value.

This script worked just fine in FinalBuilder 7. I just loaded it in FinalBuilder 8 and executed, without any other changes.

I don’t understand why this script suddenly fails. Can someone please enlighten me?

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [January 29, 2020, 10:12pm UTC](https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708/2 "2020-01-29T22:12:49Z")

</div>

Hi Primož

I have tried to reproduce this here but it worked first time.

What build of FinalBuilder 8 are you using?

I have attached my test project.

[Primož-SetVariable.fbp8](https://www.finalbuilder.com/forums/uploads/short-url/kCeQYnOnQQzuBDbSjrtMuCjxzPe.fbp8) (1.6 KB)

---

<div class="post-metadata">

**Author:** ![gabr42](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/g/e36b37/32.png) [@gabr42](https://www.finalbuilder.com/forums/u/gabr42)\
**Post date:** [January 30, 2020, 11:08am UTC](https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708/3 "2020-01-30T11:08:00Z")

</div>

Your project fails with exactily the same error.

For testing I just loadede it in FB8 and pressed “play”.

FB is the latest official release - 8.0.0.2701.

I’m attaching (zipped) execution log.

[Primo\_\_-SetVariable.zip](https://www.finalbuilder.com/forums/uploads/short-url/pcHVZ3V5pTRT2BfDzcEsJEUZinh.zip) (20.2 KB)

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [January 30, 2020, 12:30pm UTC](https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708/4 "2020-01-30T12:30:33Z")

</div>

I just realised I have a fix that you do not have, and it’s probably related. Please try this build

[https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_2795.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_2795.exe)

---

<div class="post-metadata">

**Author:** ![gabr42](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/g/e36b37/32.png) [@gabr42](https://www.finalbuilder.com/forums/u/gabr42)\
**Post date:** [January 30, 2020, 1:31pm UTC](https://www.finalbuilder.com/forums/t/set-variable-stopped-working-after-upgrade-7-8/6708/5 "2020-01-30T13:31:37Z")

</div>

This updated version indeed fixed the problem. Thanks!
