mIRC Homepage

quote

Posted By: confuzzed

quote - 15/07/05 09:38 PM

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
Posted By: MikeChat

Re: quote - 16/07/05 01:55 AM

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
Posted By: confuzzed

Re: quote - 16/07/05 08:17 AM

ya i already got it thanks tho laugh
© 2022 mIRC Discussion Forums