Hello,
I need just some little help with a script I've made.
It's supposed to let people vote for a game with !vote in chat, and then the game should be saved into a file in my mIRC folder.
This is the script:
ON*:CONNECT: {
raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/commands
raw CAP REQ :twitch.tv/tags
}
ON *:text:!vote *:#yznb: {
if ($msgtags(subscriber).key) {
write SUBTEST.txt Game: ( $+ $2- $+ ) Requested by: ( $+ $nick $+ )
}
else {
$isin(HIGHLIGHT.txt) {
msg $chan @ $+ $nick You've already placed your vote.
}
}
}
What I've been trying to do is that if the user who wrote !vote already is in the SUBTEST.txt file, the message
"You've already placed your vote." shall appear, and the game that the person has voted for should not be saved into the file.
I tried to like this, but it doesn't work:
ON *:text:!vote *:#yznb: {
if ($msgtags(subscriber).key) {
write SUBTEST.txt Game: ( $+ $2- $+ ) Requested by: ( $+ $nick $+ )
}
else {
if $nick == $isin(HIGHLIGHT.txt) {
msg $chan @ $+ $nick You've already placed your vote.
}
}
}
Anyone that know what's wrong or what I should replace it with, for making it work?
I've also tried the "else" that's stated in the first Code, but that didn't seem to work either.
Thanks!