Jump to content

Me Again


paddy1180

Recommended Posts

im wrote this test script to see if it worked

i get and error im the mirc status window saying

* /if insufficient parameters (line 2, jobscript.mrc)

on *:SIGNAL:mta.command:{
 if ($3 == !hire)
 if ($4 != $mta.name)
 if($readini($scriptdir $+ Job.ini,$mta.name($1,$2),hired) != $null){
 !writeini -n " $scriptdir $+ job.ini" $mta.name($1,$2),hired 1
 mta.msg $1 $2 You are now aloud to start work
}
else mta.msg $1 $2 You have already been hired!!!
}
on *:SIGNAL:mta.command:{
if ($3 == !job){
if (Starfish-island isin $rpg.area($1,$2)){
if ($readini($scriptdir $+ job.ini,$mta.name($1,$2),hired) != 1){
mta.msg $1 $2 You have started work
!.timer 1 60 mta.msg $1 $2 You have recived your wage (Wage : 500)
!writeini -n " $rpg.dir $+ rpg.ini" $mta.name($1,$2) cash $calc($readini(rpg.dir $+ rpg.ini,$mta.name($1,$2),cash) + 500)
}
else mta.msg $1 $2 You need to be hired first!!!
}
else mta.msg $1 $2 you must be at Starfish-island to start work!!!
}
}

can someone help?

//EDIT bye the way the script dosnt work

Link to comment

Use decent identing and you can see the brackets are not aligned. Try this : (havent tested it myself)

on *:SIGNAL:mta.command:{
 if ($3 == !hire) {
   if ($4 != $mta.name) {
     if($readini($scriptdir $+ Job.ini,$mta.name($1,$2),hired) != $null) {
       !writeini -n " $scriptdir $+ job.ini" $mta.name($1,$2),hired 1
       mta.msg $1 $2 You are now aloud to start work
     }
     else {
       mta.msg $1 $2 You have already been hired!!!
     }
   }
 }
}

on *:SIGNAL:mta.command:{
 if ($3 == !job) {
  if (Starfish-island isin $rpg.area($1,$2)) {
    if ($readini($scriptdir $+ job.ini,$mta.name($1,$2),hired) != 1) {
      mta.msg $1 $2 You have started work
      !.timer 1 60 mta.msg $1 $2 You have recived your wage (Wage : 500)
      !writeini -n " $rpg.dir $+ rpg.ini" $mta.name($1,$2) cash $calc($readini(rpg.dir $+ rpg.ini,$mta.name($1,$2),cash) + 500)
     }
     else {
       mta.msg $1 $2 You need to be hired first!!!
     }
   }
  }
  else {
    mta.msg $1 $2 you must be at Starfish-island to start work!!!
  }
 }
}

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...