Well, that new code has definitely come the closest to being right, but there's still some errors when the actual number has 2 or more digits the same... I logged this earlier today.

[14:13] <not_sure> !guess 2359
[14:13] <+LexiaBot9000> You have 2 correct and 2 out of place.
[14:14] <not_sure> !guess 2953
[14:14] <+LexiaBot9000> You have 0 correct and 3 out of place.
[14:14] <not_sure> uh oh
[14:14] <Fernin> ohhh bother...
[14:14] <not_sure> !guess 5329
[14:14] <+LexiaBot9000> You have 3 correct and 1 out of place.
[14:15] <not_sure> well, umm
[14:15] <not_sure> !guess 2222
[14:15] <+LexiaBot9000> You have 0 correct and 0 out of place.
[14:15] <not_sure> !guess 3333
[14:15] <+LexiaBot9000> You have 2 correct and 0 out of place.
[14:15] <not_sure> !guess 5339
[14:15] <+LexiaBot9000> That's right! 5339! You win, not_sure!

And unrelated to that is another problem I'm having, setting up a score file for it to keep track of everyone's scores.

Code:
on 1:text:*score:#: {
  if ($1 == %c $+ score) {
    set %sname $2
    if (%sname != $null) && ($readini(ini\mastermind.rank,Rank,%sname) != $null) {
      msg $chan %sname $+ 's current record is $readini(ini\mastermind.rank,Rank,%sname) guesses.
    }
    if (%sname != $null) && ($readini(ini\mastermind.rank,Rank,%sname) == $null) {
      msg $chan I don't have any records for nick %sname $+ .
    }
    if (%sname == $null) && ($readini(ini\mastermind.rank,Rank,$nick) != $null) {
      msg $chan $nick $+ , your current record is $readini(ini\mastermind.rank,Rank,$nick) guesses.
    }
    else {
      msg $chan ...Who the hell are you again? I don't have any records for $nick $+ .
    }    
  }
}


As of now, the else works, and the third if, with %sname null and their record not null also works. However, when you try to look up either a name it does or doesn't have, it does nothing. What'd I screw up this time?

Edit: Before you ask, and I know you will since it's the obvious thing to ask, the file does exist, in that location, and I know it's being written to correctly when they get an answer right.

Last edited by Fernin; 29/01/09 01:54 AM.