mIRC Home    About    Download    Register    News    Help

Print Thread
quote #125233 15/07/05 09:38 PM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
ok this is driveing me nuts i can get the thing to write the quote but cant get it to read the quote lol so if someone could please point out what im doing wrong i would appreciate it.

Code:
on *:TEXT:!addquote*:#: {
  if ($nick isvoice #) {
    writeini -ds quotes.ini $2- $+ 
    msg $chan Quote was added. ( $+ $2- $+ ) 
  }
}
on *:TEXT:!quote*:#: {
  if ($nick isvoice #) {
    if (!$readini(quotes.ini,Nicks,$+ $2 $+)) { 
      .notice $nick I'm sorry but there are no quotes for this user. 
      halt 
    }
    else {
      msg $chan  ( $+ $gettok($readini(quotes.ini,Nicks,$+ $2 $+),1,61) $+ ) 
    }
  }
}

Thanks like i said tho it writes the quotes just fine but it wont read the ini and display the info

Re: quote #125234 16/07/05 01:55 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
on *:TEXT:!addquote*:#: {
if ($nick isvoice #) {
writeini -ds quotes.ini $2- $+
writeini quotes.ini nicks $nick $2-
msg $chan $nick $+ `s Quote was added. ( $+ $2- $+ )
}
}
on *:TEXT:!quote*:#: {
if ($nick isvoice #) {
if (!$readini(quotes.ini,Nicks,$nick)) {
.notice $nick I'm sorry but there are no quotes for this user.
halt
}
else {
msg $chan ( $+ $readini(quotes.ini,Nicks,$nick) $+ )
}

}
}

I didnt test this, but I think it will work, you were writing the topic as the first word of the quote and the item as $3 but trying to read the topic Nick with the first token 61
anyway I think this will work.

right now look in the ini and see what [topic]s there are

what I think you want is
[nick]
nickname1 = I like spiders and snakes
nickname2 = I thought I was wrong once, but I was mistaken.

and so on

Re: quote #125235 16/07/05 08:17 AM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
ya i already got it thanks tho laugh