Ok, here's a cleaned up version... You had various errors:

Code:
;********************
;*Setup dialog table*
;********************

dialog scad_setup_t {
  title "Scrim Advertisment 1.0 Setup"
  size -1 -1 127 130
  option dbu
  tab "Channels", 1, 0 0 126 130
  check "1:", 11, 4 17 16 10, tab 1 left
  check "2:", 12, 4 28 16 10, tab 1 left
  check "3:", 13, 4 39 16 10, tab 1 left
  check "4:", 14, 4 50 16 10, tab 1 left
  check "5:", 15, 4 61 16 10, tab 1 left
  check "6:", 16, 4 72 16 10, tab 1 left
  check "7:", 17, 4 83 16 10, tab 1 left
  check "8:", 18, 4 94 16 10, tab 1 left
  check "9:", 19, 4 105 16 10, tab 1 left
  check "10:", 110, 2 116 18 10, tab 1 left
  edit "", 111, 24 17 72 10, tab 1 autohs limit 255
  edit "", 112, 24 28 72 10, tab 1 autohs limit 255
  edit "", 113, 24 39 72 10, tab 1 autohs limit 255
  edit "", 114, 24 50 72 10, tab 1 autohs limit 255
  edit "", 115, 24 61 72 10, tab 1 autohs limit 255
  edit "", 116, 24 72 72 10, tab 1 autohs limit 255
  edit "", 117, 24 83 72 10, tab 1 autohs limit 255
  edit "", 118, 24 94 72 10, tab 1 autohs limit 255
  edit "", 119, 24 105 72 10, tab 1 autohs limit 255
  edit "", 1110, 24 116 72 10, tab 1 autohs limit 255
  tab "Theme", 2
  text "Insert your theme here. Note that the last colours of the left and middle theme sections should be the colours you want the text to be.", 20, 4 20 118 20, tab 2
  text "Left:", 21, 9 44 12 8, tab 2 right
  text "Middle:", 23, 4 56 17 8, tab 2 right
  text "Right:", 25, 6 68 15 8, tab 2 right
  edit "", 22, 25 43 97 10, tab 2
  edit "", 26, 25 68 97 10, tab 2
  edit "", 24, 25 55 97 10, tab 2
  tab "Messages", 3
  text "Clan Acronym:", 30, 4 17 35 8, tab 3
  text "Match size:", 32, 4 39 27 8, tab 3
  text "Server:", 34, 4 83 18 8, tab 3
  text "Map:", 36, 4 61 12 8, tab 3
  text "Contact info:", 38, 4 105 32 8, tab 3
  edit "", 31, 4 26 118 10, tab 3
  edit "", 33, 4 48 118 10, tab 3
  edit "", 35, 3 70 118 10, tab 3
  edit "", 37, 4 92 118 10, tab 3
  edit "", 39, 4 114 92 10, tab 3
  tab "Other", 4
  check "Join channels as they are messaged", 60, 4 17 98 10, tab 4
  button "Ok", 5, 100 114 22 12, ok
}

;************************
;*Read INI file on start*
;************************

alias readsettings {
  set %joinchans $readini scad.ini general joinchans

  set %numchans $readini scad.ini channels numchans
  set %chan1 $readini scad.ini channels chan1
  set %chan2 $readini scad.ini channels chan2
  set %chan3 $readini scad.ini channels chan3
  set %chan4 $readini scad.ini channels chan4
  set %chan5 $readini scad.ini channels chan5
  set %chan6 $readini scad.ini channels chan6
  set %chan7 $readini scad.ini channels chan7
  set %chan8 $readini scad.ini channels chan8
  set %chan9 $readini scad.ini channels chan9
  set %chan10 $readini scad.ini channels chan10

  set %tl $replace($readini(scad.ini,theme,left),~c,,~b,,~u,,~o,)
  set %tm $replace($readini(scad.ini,theme,mid),~c,,~b,,~u,,~o,)
  set %tr $replace($readini(scad.ini,theme,right),~c,,~b,,~u,,~o,)

  set %name $readini scad.ini info name
  set %size $readini scad.ini info size
  set %map $readini scad.ini info map
  set %serv $readini scad.ini info serv
  set %info $readini scad.ini info info
  set %slook $readini scad.ini info slook
  set %sfind $readini scad.ini info sfind
  set %rlook $readini scad.ini info rlook
  set %rfind $readini scad.ini info rfind
  set %ram $readini scad.ini info ram
  set %pmme $readini scad.ini info pmme

  set %smessage $readini scad.ini messages smessage
  set %sumessage $readini scad.ini messages sumessage
  set %rmessage $readini scad.ini messages rmessage
  set %rumessage $readini scad.ini messages rumessage
  set %ramessage $readini scad.ini messages ramessage
}
alias startsetup {
  readsettings
  /dialog -m scad_setup scad_setup_t
}
on *:LOAD: {
  /echo 4 Scrim Advertisement Script v1.0 By ReK_
  startsetup
}
on *:START: {
  readsettings
}

;***************
;*Dialog events*
;***************

on *:dialog:scad_setup:init:*: {
  if (%joinchans == 1) /did -c scad_setup 60

  var %cnt 1
  while (%cnt <= %numchans) {
    var %cnt2 %cnt
    while (%cnt2 <= 10) {
      if (%chan [ $+ [ %cnt2 ] ] != $null) {
        did -c scad_setup 1 $+ %cnt
        did -a scad_setup 11 $+ %cnt %chan [ $+ [ %cnt2 ] ]
        break
      }
      inc %cnt2
    }
    inc %cnt
  }

  /did -a scad_setup 22 %tl
  /did -a scad_setup 24 %tm
  /did -a scad_setup 26 %tr

  /did -a scad_setup 31 %name
  /did -a scad_setup 33 %size
  /did -a scad_setup 35 %map
  /did -a scad_setup 37 %serv
  /did -a scad_setup 39 %info
}

on *:dialog:scad_setup:sclick:5: {
  /writeini -n scad.ini general joinchans $did(60)

  remini scad.ini channels
  var %cnt 1
  while (%cnt <= 10) {
    if ($did($calc(10 + %cnt)).state == 1) {
      writeini -n scad.ini channels chan [ $+ [ %cnt ] ] $did(11 $+ %cnt)
    }
    inc %cnt
  }
  set %c $ini(scad.ini,Channels,0)
  /writeini -n scad.ini channels numchans %c

  remini scad.ini theme
  remini scad.ini info
  if ($did(22)) writeini -n scad.ini theme left $replace($did(22),,~c,,~b,,~u,,~o)
  if ($did(24)) writeini -n scad.ini theme mid $replace($did(24),,~c,,~b,,~u,,~o)
  if ($did(26)) writeini -n scad.ini theme right $replace($did(26),,~c,,~b,,~u,,~o)

  if ($did(31)) writeini -n scad.ini info name $did(31)
  if ($did(33)) writeini -n scad.ini info size $did(33)
  if ($did(35)) writeini -n scad.ini info map $did(35)
  if ($did(37)) writeini -n scad.ini info serv $did(37)
  if ($did(39)) writeini -n scad.ini info info $did(39)

  readsettings
} 


Changes are:

.state is needed to see if a checkbox is "1".
Using the while loops shortens the script considerably.
Fixed it so a blank value in theme or info will no longer give an error.
Fixed it so that if someone put a channel in a spot other than in order, it will still work correctly.
Fixed it so that it only writes data when OK is pressed rather than everytime someone single clicks the dialog.
Fixed it so it will remove theme/info data if the person wants to have it blank.

Just a note... the way you have it, if someone unchecks a channel and presses OK, then the channel is removed from the channel list. You may not want it to do that... it's up to you.

And, finally... control codes cannot be placed in an INI file. Therefore, I used replace... replacing the codes with ~k,~c,~b,~o where ~ would be the Ctrl key. You can change this to something else if you think your themes will have a ~ in them for some reason... if so, pick another character that you don't believe would be used.

NOTE: I didn't rewrite or scan your entire code... just what you were having problems with.


Invision Support
#Invision on irc.irchighway.net