QuickBreakdown Posted September 11, 2007 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) } }
lil Toady Posted September 11, 2007 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) } } } Do not PM me, im not going to read it anyway.
SDK Posted September 11, 2007 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) } } } Learn Lua - Learn to script - GUI scripting Scripter tools - Find/fix errors yourself(!) Don't pm me for scripting help, keep it for the Scripting subforum!
lil Toady Posted September 11, 2007 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) Do not PM me, im not going to read it anyway.
SanZoR Posted September 12, 2007 Posted September 12, 2007 damn, i'm getting old Right. Finnish Multi Theft Auto Networks Community @ http://fin-mta.net OWNED 100mbit fiber linez ownz
Recommended Posts