QuickBreakdown Posted September 11, 2007 Share Posted September 11, 2007 Whats wrong with this script? Its supposed to be like this, i want if i say.. brb then it sets my status to brb in the ini and if i say back then it removes my status from the ini.... This is my code... but why it doesnt work? on *:SIGNAL:mta.text: { if ($3 == brb) { if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { mta.pm $1 $2 Your status are already set to "Be right back!" } else mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-) mta.pm $1 $2 Your status have been set to "Be right back!" !writeini -n status.ini Players $mta.nick($1,$2) BRB } if ($3 == back) { if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == $null) { mta.pm $1 $2 Your status are not set to "Away!" } else mta.text $1 $mta.nick($1,$2) is back, and better then ever! mta.pm $1 $2 Your status have been reset to normal. !remini -n status.ini Players $mta.nick($1,$2) } } Link to comment
lil Toady Posted September 11, 2007 Share Posted September 11, 2007 on *:SIGNAL:mta.text: { if ($3 == brb) { if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { mta.pm $1 $2 Your status are already set to "Be right back!" } else mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-) mta.pm $1 $2 Your status have been set to "Be right back!" !writeini -n " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) BRB } } elseif ($3 == back) { if (!$readini($scriptdir $+ status.ini,players,$mta.nick($1,$2))) { mta.pm $1 $2 Your status are not set to "Away!" } else mta.text $1 $mta.nick($1,$2) is back, and better then ever! mta.pm $1 $2 Your status have been reset to normal. !remini " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) } } } Link to comment
SDK Posted September 11, 2007 Share Posted September 11, 2007 You forgot the { brackets after the else on *:SIGNAL:mta.text: { if ($3 == brb) { if ($readini($scriptdir $+ status.ini,players,$mta.nick($1,$2)) == BRB) { mta.pm $1 $2 Your status are already set to "Be right back!" } else { mta.text $1 $mta.nick($1,$2) will be right back! $iif($4,Reason: $4-) mta.pm $1 $2 Your status have been set to "Be right back!" !writeini -n " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) BRB } } elseif ($3 == back) { if (!$readini($scriptdir $+ status.ini,players,$mta.nick($1,$2))) { mta.pm $1 $2 Your status are not set to "Away!" } else { mta.text $1 $mta.nick($1,$2) is back, and better then ever! mta.pm $1 $2 Your status have been reset to normal. !remini " $+ $scriptdir $+ status.ini" Players $mta.nick($1,$2) } } } Link to comment
QuickBreakdown Posted September 11, 2007 Author Share Posted September 11, 2007 So what was my fault? Link to comment
lil Toady Posted September 11, 2007 Share Posted September 11, 2007 So what was my fault? brackets mismatch, inis were written/read from diff places. ahha, right SDK, forgot that (damn, i'm getting old) Link to comment
SanZoR Posted September 12, 2007 Share Posted September 12, 2007 damn, i'm getting old Right. Link to comment
Recommended Posts