mIRC Home    About    Download    Register    News    Help

Print Thread
Variables #254960 11/09/15 02:28 AM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
Variables... Where should I start.... I hate them... I pretty much hate everything I suck at but variables are the worst haha,

Code:
  var %permStat = $readini(permlist.ini, #michaelukz, $2)



That is the specific part, Here is the breakdown, that code determines if I have enough permission that is found in my personal permissions file IE, not the 1,2,3,4,5 etc from default, instead I prefer to use my own so I can easily edit it, anyways, here is the writing section

Code:
writeini -n permlist.ini #michaelukz $2 3


Now when trying to use a specific MOD ONLY section, it seems it just skips it all together, here it is :3

Code:
var %permStat = $readini(permlist.ini, #michaelukz, $2)
  if (%permStat > 5) {
    msg $chan /me Error you do not have sufficient permissions!
    return
  }


However, it seems to be skipping that because it is allowing someone with 0 permissions to do this!

Re: Variables [Re: michaelukz] #254969 11/09/15 12:30 PM
Joined: Jul 2006
Posts: 3,722
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,722
Everything looks correct, perhaps you meant:
Code:
if (%permStat < 5) {

}
Giving an 'error' if the level is less than 5 because currently, 0 is not higher than 5 so it doesn't enter the if condition


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net