Basically I have this going on.
while (!$findfile(C:\program files\mirc3\files\,$gettok($read(songrequest.txt,1),%a,58),1)) {
if ($deltok($read(request.txt,1),%a,58) != $null) { write -c songrequest.txt $deltok($read(songrequest.txt),%a,58) }
if ($file(songrequest.txt).size == 0) { remove songrequest.txt }
}
In this case %a = 1
What I've got is an online php script that will write to songrequest.txt in this fashion: if there is already text in songrequest.txt it will append : and the song request to whatever is currently in the file. I'm using a tokenized list within this file with : as the separator. When this while loop is run, it will basically go into the nonstop loop of death, causing me to have to kill mIRC and restart it.
Basically all this needs to do is WHILE it cannot find the filename, then IF there are still other tokens in the list, it deletes that token within the list and writes that updated tokenized list to the file, or IF the filesize is 0, then it deletes the file. It seems to me that that is covering both cases. Yet, judging from the loop of death I'm getting each time the while the loop runs, i'm assuming that its failing. Any help here would be appreciated.