[edit]
Ok, i get what you guys are saying. However, DaveC your script didn't do what I was asking, but it works.
My if statement was flawed, but I assigned the name of the variable to a temporary variable and put it in the if.
My script was simple but broken.
DaveC's script was too complex but worked.
His script made things more complicated then they had to be.
HIS
on *:TEXT:!addme *:#: {
/set $+(%,person.,$nick) $2-
/msg $chan $nick added
}
on *:TEXT:!read &:#: {
if ($var($+(%,person.,$2),1) == $+(%,person.,$2)) {
/msg $chan $($v2,2) ( $+ $v2 found) }
else {
/msg $chan $2 is not found (can't find $v2 $+ )
}
}
MINE
on *:TEXT:!add:#: {
/set $+(%,person.,$nick) 1
/msg $chan $nick added
}
on *:TEXT:!read *:#: {
/set %persontemp %person. $+ $2
if ($var(%persontemp) == 1) {
/msg $chan $2 Found!
}
else {
/msg $chan user not found
}
/unset %persontemp
}
/msg $chan $($v2,2) ( $+ $v2 found) <---- You dont need all that
/msg $chan $2 Found! <----- Works just fine
btw, why do you guys jumble your scripts together like that? Does it make your scripts look more complicated so people think your smarter? In my opinion, its much easier to script and understand when things are properly spaced and organized.
Last edited by BNX; 05/07/05 02:09 AM.