Here's the thing... I don't want to USE the "if".
The point of that command is to write to a file, specifically to write...
"if $address == $$2" to test.txt
I want the "If" to be output to the file, not interpreted as a command. The command works fine, it's executed properly and fills the variables properly. The problem is instead of writing "if" to the file, it's trying to interpret it as a command (as in, like your example, it's expecting an actual IF statement being used).
$$2 in this example is a usererid @ address pulled from a list box. Right click the name, you are presented options. One of those adds the entry to a cross referenced file maintaining permenant bans and statistics surrounding that.
The commands intent is to search an existing script full of entries like this...
on *:join: {
if $address == blablabla @ blablabla { goto 1 }
if $address == blablabla @ blablabla { goto 2 }
else return
:1
blabla
:2
blabla
}
The desired result is to right click one of the entries in the list box, and have the script create a new "if $address == blablabla { goto #}" entry at the top of the list of them after the on join.
The seek works, right clicking the list box fills the variables properly, but I cannot find any method of making it add a line "if $address == blablabla" because it's trying to interpret the IF statement instead of just dump it to file.
Hope this makes more sense now.
I will try seperating the -i$readn but I don't think that will help.
As for "if" usage, trust me I understand haha. I've got more than 5,000 lines of script into my little project thus far.