I'm trying to set up a subroutine to check if I still have a mission. I'm trying to improve my Freeport faction macro, so it knows when to go back to Tacots. Here is the code I'm trying to use and the error it is returning.
Error
Any help would be greatly appreciated.
Rich (BB code):
/declare mission string local "Giants in the Desert"
/declare havemission bool local FALSE
Sub Main
/if (${Bool[${Window[TaskWnd].Child[TASK_TaskList].List[1,2]}] && ${mission}}) {
/varset ${havemission} TRUE
/echo "We have to kill giants"
} else {
/varset ${havemission} FALSE
/echo "No mission"
}
/return
Error
Rich (BB code):
[2015/09/15 17:03:29] Unmatched bracket or invalid character following bracket found in index: ''
[2015/09/15 17:03:29] mission.mac@7 (Main): /if (${Bool[${Window[TaskWnd].Child[TASK_TaskList].List[1,2]}] && ${mission}}) {
[2015/09/15 17:03:29] /varset failed, variable 'NULL' not found
[2015/09/15 17:03:29] mission.mac@11 (Main): /varset ${havemission} FALSE
[2015/09/15 17:03:29] [MQ2] "No mission"
[2015/09/15 17:03:29] The current macro has ended.
Any help would be greatly appreciated.

