Convirion Posted February 1, 2007 Share Posted February 1, 2007 Hi, I'm making my own ranking system, I already made a !setrank but the online problem is !rank. elseif ($3 == !rank) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) rank is: $readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)) } what do I wrong? I think it's something with the $readini edit: is it also possible to add a thing like this: !rank (on someone who hasn't a rank) Player doesn't have a rank thank you Link to comment
{CE}EyeZ Posted February 1, 2007 Share Posted February 1, 2007 What is this meant for? mta : SA or MTA:VC? hopefully mta vc Link to comment
BetaDevil Posted February 1, 2007 Share Posted February 1, 2007 Place your !setrank-command please Link to comment
Convirion Posted February 1, 2007 Author Share Posted February 1, 2007 why it will only write to a file called rank.ini ( i know that that works ) but ok here it is: elseif ($3 == !setrank) { if (gus.level($1,$2) >= 7) { if (%a == -1) mta.pm $1 $2 Error - Absent ID elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself. elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level. else { !writeini -n " $+ $scriptdir $+ rank.ini" ranked $4 $5- mta.text $1 $mta.nick($1,$2) your rank is set to: $5- } } else mta.pm $1 $2 Error - You need to be level 7 to use this command. } this was it i thought, couldn't copy it. Link to comment
Raoul Posted February 1, 2007 Share Posted February 1, 2007 I made this: elseif ($3 == !points) { if (%a == -1) mta.pm $1 $2 Absent ID! else mta.text $1 $mta.nick($1,%a) has $readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,%a)) points! } } It's almost the same only I use !points and points.ini, dunno if something is different... Link to comment
Convirion Posted February 1, 2007 Author Share Posted February 1, 2007 hmmm looks the same.... Link to comment
lil Toady Posted February 1, 2007 Share Posted February 1, 2007 why it will only write to a file called rank.ini ( i know that that works )but ok here it is: elseif ($3 == !setrank) { if (gus.level($1,$2) >= 7) { if (%a == -1) mta.pm $1 $2 Error - Absent ID elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself. elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level. else { !writeini -n " $+ $scriptdir $+ rank.ini" ranked $4 $5- mta.text $1 $mta.nick($1,$2) your rank is set to: $5- } } else mta.pm $1 $2 Error - You need to be level 7 to use this command. } this was it i thought, couldn't copy it. i'd not say that it works fine Link to comment
Convirion Posted February 1, 2007 Author Share Posted February 1, 2007 it wrote it to the file, but i could have made a mistake b/c i needed to type it here and i couldn't copy it edit: Just the problem is the !rank not the !setrank Link to comment
BetaDevil Posted February 1, 2007 Share Posted February 1, 2007 This works (I think), but more of my scripts don't work so you have to try.[syntax=mIRC] elseif ($3 == !setrank) { if (gus.level($1,$2) >= 7) { if (%a == -1) mta.pm $1 $2 Error - Absent ID elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself. elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level. else { !writeini -n " $+ $scriptdir $+ rank.ini" ranked $4 $5- mta.text $1 $mta.nick($1,%a) your rank is set to: $5- } } else mta.pm $1 $2 Error - You need to be level 7 to use this command. } elseif ($3 == !rank) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) $+ 's rank is: $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank) }[/lua] Link to comment
Convirion Posted February 1, 2007 Author Share Posted February 1, 2007 hey betadevil it works! elseif ($3 == !rank) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) $+ 's rank is: $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank) } thank you all for looking to it Link to comment
BetaDevil Posted February 1, 2007 Share Posted February 1, 2007 uhmm sorry, doesn't work this is a fixed one. [syntax=mIRC] elseif ($3 == !setrank) { if (gus.level($1,$2) >= 7) { if (%a == -1) mta.pm $1 $2 Error - Absent ID elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself. elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level. else { !writeini -n " $+ $scriptdir $+ rank.ini" ranked $mta.nick($1,%a) $5- mta.text $1 $mta.nick($1,%a) your rank is set to: $5- } } else mta.pm $1 $2 Error - You need to be level 7 to use this command. } elseif ($3 == !rank) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) $+ 's rank is: $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank) }[/lua] Link to comment
lil Toady Posted February 1, 2007 Share Posted February 1, 2007 yay you noticed that typo in !setrank! Now i can sleep well knowing that at least somebody became a good scripter here j/k Link to comment
BetaDevil Posted February 1, 2007 Share Posted February 1, 2007 I can always sleep well knowing there's a good scripter to help Link to comment
Squall Posted February 2, 2007 Share Posted February 2, 2007 would this make it a wency bit smaller elseif ($3 == !setrank) && (gus.level($1,$2) >= 7) { if (%a == -1) mta.pm $1 $2 Error - Absent ID elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself. elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level. else { !writeini -n " $+ $scriptdir $+ rank.ini" ranked $mta.nick($1,%a) $5- mta.text $1 $mta.nick($1,%a) your rank is set to: $5- } } else mta.pm $1 $2 Error - You need to be level 7 to use this command. } elseif ($3 == !rank) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) $+ 's rank is: $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank) } Link to comment
lil Toady Posted February 2, 2007 Share Posted February 2, 2007 Theoden, the only thing you've done is a bracket mismatch and not working "You need to be level 7 to use this command." message.... Link to comment
Convirion Posted February 2, 2007 Author Share Posted February 2, 2007 lol guys it was for the !rank command not the !setrank that works fine, and again thank you for the helping Link to comment
Recommended Posts