|
Lowe Newbie
Joined: 13 Jan 2006 Posts: 3 Location: Corona Ca
|
Posted: Sat Sep 13, 2008 6:31 am
Trying to figure out #IF command |
This is what i have so far
#T- track@CurrentTrack
#ADD CurrentTrack 1
#IF (@CurrentTrack =~ 11) {@CurrentTrack =~ 1}
#T+ track@CurrentTrack
I have an alarm that runs currenttrack so that it can change the folder with my triggers in it from one to another i think the problem lies in the #if command. The two samples helped some but i can't get it to work right. I know i'm doing something wrong.
#IF (@gold < 100000) {emote is poor} {emote is RICH!}
#IF (@line =~ "You receive (%d) coins") {split %pat(1)} |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Sep 13, 2008 8:40 am |
Code: |
#IF (@CurrentTrack == 11) {CurrentTrack = 1} |
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Sep 15, 2008 1:16 pm |
Actually, it's just
Code: |
#IF (@CurrentTrack = 11) {CurrentTrack = 1} |
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Sep 15, 2008 5:12 pm |
Either = or == will both work for testing equality. The =~ operator is for testing a pattern match as shown in the help file example.
Anyway, either Oldguy2 or Rehab solutions should work for you. Both are correct. |
|
|
|
|
|