Disclaimer: pretty bad at coding, pretty new to doing anything involving mIRC scripting, attempting to modify a quote script from this video
So rn I'm trying to add a command to my twitch IRC bot so I can have people add guitar hero song requests and have them save in a text file i can read from to display on stream, and I'm having some trouble.
!request should add someones song request to the file, hoping that i can read the text from file using a text source on OBS
I created a new remote script called requests.ini:
on *:TEXT:!request *:#: {
write requestsinfo.txt $2- $+
msg $chan Added $2- to queue.
}
on *:TEXT:!show:#: {
if ((%floodREQUEST) || ($($+(%,floodREQUEST.,$nick),2))) { return }
set -u10 %floodEVERYONE On
set -u30 %floodEVERYONE. $+ $nick On
msg $chan $read(requestsinfo.txt)
}
When I type !request [song name] it replies in chat properly, however when i open the text file or pull the text in an obs text source the file is blank. Using !show, I can get the requests to show up, however this only works during a given session, as after closing mIRC nothing saves.
So my question is (please fix my broken code) is there something I am doing wrong? how do I get the text to actually save to the file? why does it pseudo-write to the file (am able to show the request using !show)?