mIRC Homepage
Posted By: harl91 dialog error - 25/04/07 11:35 PM
here is the script
Code:

;;On First Join to #Winbolo...
on *:join:*:{
  if (%first == yes) { 
    echo #winbolo ::: Hello, this is Winbolo Bot version 4.0. Re-written by Harl91. You need to configure me. Please fill out the window that pop's up. 
    dialog -m startup startup 
  }
}

dialog startup {

  title "WBB Startup Config"
  size 300 200 255 200
  option dbu

  box "Fill out this information", 1, 5 2 245 190

  text "Please write your bots name below", 2, 20 30 70 7
  edit "", 3, 20 37 150 10
  text "Please insert a password for your bot", 4, 20 50 70 7
  edit "", 5, 20 57 150 10
  text "Lastly, please set the port range for your bot to make games on, 6, 20 70 150 10
  edit "", 7, 20 77 75 10
  edit "", 8, 95 77 75 10
  button "Ok", 9, 20 90 60 20

}

on *:dialog:startup:sclick:*:{
  if ($did == 9) {
    nick $did(startup, 3).text
    set %bot.pass $did(startup, 5).text
    set %bot.port1 $did(startup, 7).text
    set %bot.port2 $did(startup, 8).text
    set %first no
    echo #winbolo ::: Startup Config is complete! If you wish to further configure your bot, right click on the #winbolo chat and click config.
    dialog -x startup startup
  }
}

;;Set Password
on 101:text:*setpass*:*:{
  if ($1 == $me) {
    set %bot.pass $3-
    msg $chan $me $+ 's password has been changed to %password
  }
}

;;Request Password
on *:text:*password*:*:{
  if ($1 == $me) { msg $chan The password for $me is %bot.pass
  }
}

;;Lock Game
on *:text:*lock*:*:{
  if ($1 == $me) {
    /run C:/winbolo/wonkaDSctl.exe lock $3
    Good luck getting in! The game on port $3 has just been locked by $nick $+ .
  }
}

;;Unlock Game
on *:text:*unlock*:*:{
  if ($1 == $me) {
    /run c:/winbolo/wonkadsctl.exe unlock $3
    Flood gates are opened! The game on port $3 has just been unlocked by $nick $+ .
  }
}

;;Kill Game
on *:text:*kill*:*:{
  if ($1 == $me) {
    /run c:/winbolo/wonkaDSctl.exe quit $3
    msg $chan BOOM! $nick has just killed game on port $3 
  }
}

;;Map a Game.
on *:text:*map*:*:{
  if ($1 == $me) {
    set %map $3-
    set %settings
    if (%settings !== map) {
    }
    /run C:/winbolo/wonkadsrun.exe strict 27500 " $+ %map $+ "
    msg $chan  $nick has just started a game. %map  @ winbolo:// $+ $right($address($me, 2), -4) $+ : $+ 27500 - password: %bot.pass 
  }
}


now when i type /hop (to test the first join) I get this error about my dialog

* /dialog: 'startup' invalid table, in 'text' (line 14, script12.mrc)

i dont see what is wrong...
Posted By: RusselB Re: dialog error - 25/04/07 11:48 PM
You're missing a quotation mark at the end of the actual text in that line. Corrected line is below.
Code:
text "Lastly, please set the port range for your bot to make games on", 6, 20 70 150 10
Posted By: harl91 Re: dialog error - 25/04/07 11:52 PM
oh wow, i never knew this thing was THAT picky... you would think it would have given me the error on that line rather then the other

thanks for the help
Posted By: RusselB Re: dialog error - 26/04/07 12:50 AM
With some things, mIRC is very picky, with others it's not. I prefer to err on the side of caution (ie: be extremely picky), just in case mIRC is pickier than I am on something (you can't get too picky for mIRC)

As to why it was giving you the wrong line number, I don't have a clue.
© mIRC Discussion Forums