Script Help Thread (DO NOT REQUEST SCRIPTS)
View Single Post
February 23rd, 2012 (2:01 PM).
Helfen, Wehren, Heilen
Join Date: Sep 2009
Originally Posted by
Can anyone explain why this snippet of my XSE script won't work?
addvar 0x10AA 0x1
copyvar 0x10AA 0x800D
compare 0x800D 0x3
if 0x1 call @2
I'm trying to make [compare] send the script to @2 when the variable 0x10AA reaches 3 (adding 1 in this script and 2 in another beforehand) however nothing happens - I'm not sure if its the adding which isn't working or my method of comparing the value :S.
The copyvar command is being used incorrectly, when you don't even need to use it at all. The first variable you put in copyvar is the destination while the second is the source (i.e the first variable copies the value of the second variable). In your script, variable 0x10AA will be taking on the value of 0x800D rather than the other way around, which is why the script will never work in the way you want it to. In addition, you don't need to copyvar 0x10AA to 0x800D at all, as the 'compare' command doesn't discriminate based on the variable used. Just use this:
... addvar 0x10AA 0x1 compare 0x10AA 0x3 if 0x1 call @2 ...
View Public Profile
Send a private message to DrFuji
Find all posts by DrFuji
Find threads started by DrFuji