Case "CompareObVersion" If CompareObVersion('1.2.0.416') == -1 Note "Installed Oblivion version is less than the version specified('1.2.0.416')" Elif CompareObVersion('1.2.0.416') == 0 Note "Installed Oblivion version is the same as than the version specified('1.2.0.416')" Elif CompareObVersion('1.2.0.416') == 1 Note "Installed Oblivion version is higher than the version specified('1.2.0.416')" EndIf Break
It threw this error
Spoiler
An unhandled error occured while parsing the wizard:
Line(409): If CompareObVersion('1.2.0.416') == -1
Traceback (most recent call last):
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\belt.py", line 707, in Continue
self.RunLine(newline)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 475, in RunLine
key(*self.tokens)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 341, in __call__
def __call__(self, *args, **kwdargs): return self.data(*args, **kwdargs)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 257, in __call__
return super(Parser.Keyword,self).__call__(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 218, in __call__
return self.execute(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 235, in execute
return self.function(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\belt.py", line 957, in kwdIf
bActive = self.ExecuteTokens(args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 550, in ExecuteTokens
return self.ExecuteRPN()
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 671, in ExecuteRPN
ret = i(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 341, in __call__
def __call__(self, *args, **kwdargs): return self.data(*args, **kwdargs)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 218, in __call__
return self.execute(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 235, in execute
return self.function(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\belt.py", line 853, in opMul
def opMul(self, l, r): return l * r
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 318, in __mul__
def __mul__(self, other): return Parser.Token(self.data * other.data)
TypeError: can't multiply sequence by non-int of type 'str'
An unhandled error occured while parsing the wizard:
Line(409): If CompareObVersion('1.2.0.416') == -1
Traceback (most recent call last):
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\belt.py", line 707, in Continue
self.RunLine(newline)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 475, in RunLine
key(*self.tokens)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 341, in __call__
def __call__(self, *args, **kwdargs): return self.data(*args, **kwdargs)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 257, in __call__
return super(Parser.Keyword,self).__call__(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 218, in __call__
return self.execute(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 235, in execute
return self.function(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\belt.py", line 957, in kwdIf
bActive = self.ExecuteTokens(args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 550, in ExecuteTokens
return self.ExecuteRPN()
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 671, in ExecuteRPN
ret = i(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 341, in __call__
def __call__(self, *args, **kwdargs): return self.data(*args, **kwdargs)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 218, in __call__
return self.execute(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 235, in execute
return self.function(*args)
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\belt.py", line 853, in opMul
def opMul(self, l, r): return l * r
File "C:\Program Files\Bethesda Softworks\Oblivion\Mopy\ScriptParser.py", line 318, in __mul__
def __mul__(self, other): return Parser.Token(self.data * other.data)
TypeError: can't multiply sequence by non-int of type 'str'
Nevermind. I got it to sorta state what I wanted with Note. This bit could be added to the wizard documentation.
Note CompareWBVersion('292')
shows -1, 0 or 1 on the final screen
Note CompareObVersion('1.2.0.416')
threw an error
EDIT: apparently the wizard doesn't like -1 but will accept < 0 for WBVersion