Problem with service script!

Paste Your code(s) here, and state your problem.

Problem with service script!

Postby Jerzy » Sun May 03, 2009 5:33 pm

Hey sp00fed.org!
i have problem with my service script!
i have made a file named: service.mrc
and it looks like:
Code: Select all
on *:TEXT:*:#Jerzy:{
if ($readini(admin.ini,admin,$address($nick,2)) == admin)
{
elseif ($1 == .unban) { mode $chan -b $iif(*!*@* iswm $2,$2,$address($2,2)) }
elseif ($1 == .kick) { Kick $chan $2- }
elseif ($1 == .ban) { mode $chan +b $address($2,1) }
elseif ($1 == .kickban) { mode $chan +b $address($2,1) | kick $chan $2- }
elseif ($1 == .server-uptime) { msg $chan Uptime: $uptime(server,1) }
elseif ($1 == .join) { join $2 | msg $chan 0,14[0J4]0 Joiner nu kanal: $2 4[0J4] }
elseif ($1 == .part) { part $2 | msg
elseif ($1 == .load) { load -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt loaded! 4[0J4] }
elseif ($1 == .unload) { unload -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt unloaded! 4[0J4] }
elseif ($1 == .say) { msg $chan $2- }
elseif ($1 == .botnick) { nick $2- | msg $chan $2 har nu skiftet nick til $2- }
elseif ($1 == .voice) { mode $chan +v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet voice! (+v) 4[0J4] }
elseif ($1 == .devoice) { mode $chan -v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet devoice! (-v) 4[0J4] }
elseif ($1 == .op) { mode $chan +o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet op! (+o) 4[0J4] }
elseif ($1 == .deop) { mode $chan -o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet deop! (-o) 4[0J4] }
elseif ($1 == .invite) { .invite $2 $3 }
}
}

and then i made a file named: admin.ini there looks like:
Code: Select all
[admin]
*!*@0x4dd431d3.adsl.cybercity.dk=admin

but everytime i make a command like .say Hej or .botnick [JerzyBot] i tells me:
* /if: insufficient parameters (line 2, service.mrc)

what is the problem??

// Jerzy
Jerzy
 

Re: Problem with service script!

Postby zNigel- » Sun May 03, 2009 5:44 pm

First, try to add a "}" at the end of the script..
zNigel-
 

Re: Problem with service script!

Postby Jerzy » Sun May 03, 2009 6:12 pm

in service.mrc? there is :P
and admin.ini there dont need one.

and it's a problem in line 2.
Jerzy
 

Re: Problem with service script!

Postby nsm » Sun May 03, 2009 6:21 pm

Code: Select all
on *:TEXT:*:#Jerzy:{
if ($readini(admin.ini,admin,$address($nick,1) == admin)
{
elseif ($1 == .unban) { mode $chan -b $iif(*!*@* iswm $2,$2,$address($2,1)) }
elseif ($1 == .kick) { Kick $chan $2- }
elseif ($1 == .ban) { mode $chan +b $address($2,1) }
elseif ($1 == .kickban) { mode $chan +b $address($2,1) | kick $chan $2- }
elseif ($1 == .server-uptime) { msg $chan Uptime: $uptime(server,1) }
elseif ($1 == .join) { join $2 | msg $chan 0,14[0J4]0 Joiner nu kanal: $2 4[0J4] }
elseif ($1 == .part) { part $2 | msg
elseif ($1 == .load) { load -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt loaded! 4[0J4] }
elseif ($1 == .unload) { unload -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt unloaded! 4[0J4] }
elseif ($1 == .say) { msg $chan $2- }
elseif ($1 == .botnick) { nick $2- | msg $chan $2 har nu skiftet nick til $2- }
elseif ($1 == .voice) { mode $chan +v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet voice! (+v) 4[0J4] }
elseif ($1 == .devoice) { mode $chan -v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet devoice! (-v) 4[0J4] }
elseif ($1 == .op) { mode $chan +o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet op! (+o) 4[0J4] }
elseif ($1 == .deop) { mode $chan -o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet deop! (-o) 4[0J4] }
elseif ($1 == .invite) { .invite $2 $3 }
}
}
Last edited by nsm on Sun May 03, 2009 6:24 pm, edited 1 time in total.
nsm
 

Re: Problem with service script!

Postby zNigel- » Sun May 03, 2009 6:22 pm

add one more in service.mrc ..

That should rly fix it
zNigel-
 

Re: Problem with service script!

Postby Jerzy » Sun May 03, 2009 6:31 pm

its a problem in line 2 mate?
Jerzy
 

Re: Problem with service script!

Postby zNigel- » Sun May 03, 2009 6:49 pm

ill just fix it the way i think it should be


ok add this instead of the one u got,


Code: Select all
  if ($readini(admin.ini,admin,$address($nick,1)) == admin) {




since u were missing 1x ")"
zNigel-
 

Re: Problem with service script!

Postby Futz0r » Sun May 03, 2009 6:58 pm

Code: Select all
on *:TEXT:*:#Jerzy:{
  if ($readini(admin.ini,admin,$address($nick,1)) == admin) {
    if ($1 == .unban) { mode $chan -b $iif(*!*@* iswm $2,$2,$address($2,1)) }
    elseif ($1 == .kick) { Kick $chan $2- }
    elseif ($1 == .ban) { mode $chan +b $address($2,1) }
    elseif ($1 == .kickban) { mode $chan +b $address($2,1) | kick $chan $2- }
    elseif ($1 == .server-uptime) { msg $chan Uptime: $uptime(server,1) }
    elseif ($1 == .join) { join $2 | msg $chan 0,14[0J4]0 Joiner nu kanal: $2 4[0J4] }
    elseif ($1 == .part) { part $2 }
    elseif ($1 == .load) { load -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt loaded! 4[0J4] }
    elseif ($1 == .unload) { unload -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt unloaded! 4[0J4] }
    elseif ($1 == .say) { msg $chan $2- }
    elseif ($1 == .botnick) { nick $2- | msg $chan $2 har nu skiftet nick til $2- }
    elseif ($1 == .voice) { mode $chan +v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet voice! (+v) 4[0J4] }
    elseif ($1 == .devoice) { mode $chan -v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet devoice! (-v) 4[0J4] }
    elseif ($1 == .op) { mode $chan +o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet op! (+o) 4[0J4] }
    elseif ($1 == .deop) { mode $chan -o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet deop! (-o) 4[0J4] }
    elseif ($1 == .invite) { .invite $2 $3 }
  }
}
Futz0r
 

Re: Problem with service script!

Postby Jerzy » Sun May 03, 2009 7:29 pm

futz0r that helped, but nothing happens when i type a command s:
but now it not tells me that there are a error in line 2 :P
Jerzy
 

Re: Problem with service script!

Postby Jerzy » Sun May 03, 2009 7:33 pm

so now my scripts looks like:
Code: Select all
on *:TEXT:*:#Jerzy:{
  if ($readini(admin.ini,admin,$address($nick,2)) == admin) {
    if ($1 == .unban) { mode $chan -b $iif(*!*@* iswm $2,$2,$address($2,1)) }
    elseif ($1 == .kick) { Kick $chan $2- }
    elseif ($1 == .ban) { mode $chan +b $address($2,1) }
    elseif ($1 == .kickban) { mode $chan +b $address($2,1) | kick $chan $2- }
    elseif ($1 == .server-uptime) { msg $chan Uptime: $uptime(server,1) }
    elseif ($1 == .join) { join $2 | msg $chan 0,14[0J4]0 Joiner nu kanal: $2 4[0J4] }
    elseif ($1 == .part) { part $2 }
    elseif ($1 == .load) { load -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt loaded! 4[0J4] }
    elseif ($1 == .unload) { unload -rs $2 | msg $chan 0,14[0J4] 0Scriptet4 $2 0er succesfuldt unloaded! 4[0J4] }
    elseif ($1 == .say) { msg $chan $2- }
    elseif ($1 == .botnick) { nick $2- | msg $chan $2 har nu skiftet nick til $2- }
    elseif ($1 == .voice) { mode $chan +v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet voice! (+v) 4[0J4] }
    elseif ($1 == .devoice) { mode $chan -v $2 | msg $chan 0,14[0J4]0 $2 er nu blevet devoice! (-v) 4[0J4] }
    elseif ($1 == .op) { mode $chan +o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet op! (+o) 4[0J4] }
    elseif ($1 == .deop) { mode $chan -o $2 | msg $chan 0,14[0J4]0 $2 er nu blevet deop! (-o) 4[0J4] }
    elseif ($1 == .invite) { .invite $2 $3 }
  }
}

and admin.ini look like:
Code: Select all
[admin]
Jerzy@0x4dd431d3.adsl.cybercity.dk=admin
Jerzy
 

Next

Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron