well it has been 4 years since i did it, and i did quit using irc, i didnt know what went wrong with it and it confused me, I had a look since i got an email sayin this has been commented on and worked on it to bring definitions.
The code is below but has some issues but works.
(i cant log into my main account btw)
Updates:
17/9/11-fixed it to show if no definitions were found.
Known issues.
No spacing between examples from the same author
Sometimes sends commands to irc server (seems to be the first world from paragraphs from defining, unsure how to fix)
but here's a couple of tips:
You don't need all of the /'s
Using local variables wud be better as they are auto unset when not needed (/var rather than /set)
Also if you want you can replace:
Code
with
Code
msg $chan $sorttok($deltok(%lnumbers,7,32),32,n) $+($chr(40),%num7,$chr(41))
^ this says the first 6 numbers in order of my code and then the 7th number
and you can replace
Code
with
Code
They are shorter, it also uses local variables instead of global, although i think its about the same efficiency.
anyway another note is u dont need to write %chan to an ini file you can just set it
Code
can be:
Code
and hen you can remove any of these since its already set:
just a few tips :) :
using namespace means you're including std (since u stated std) to be used.
you can also do:
Code
if you're just using cout, which wud be more efficient if you're not using alot of std comands.
Also adding \n (when its in quotes will mean if you cout another message it well be on a new line). There is a different way but i prefer this so it would look like this:
cout << "Hello world! \n";
oh right yeah forgot to delete that lol ;x dont see why u cudnt see it though, it shows up pink not black ;s. Anyway changed it to msg $active, i still prefer say myself ;p.
i only came back today just to look how thing changed, im not gonna reinstall mirc and spend my time on finding out why ur script doesnt work.
if you have other scripts in your remotes that possibly could affect it, but seriously i cannot help any further, my mirc scripting days are well over.
you have 3 options
#1 try putting the code in a blank remotes section to see if it works then
#2 adjust the code to see if you can fix it for your mirc
#3 give up on the snippet
Another possibility is that they updated mirc in which my script no longer works. IDK why that would happen if it did (probably not, who knows) but this is the only help i can give ;p, i mean the code is too complex for me to be revising over (and im lazy ;p)
so by seeing this it msgs the channel the result. since its not working for you i would probably say you are talking to a bot using this script not in a channel. if you did this in a channel and not chat then im sorry but i cant help since its been like a year since i quit.
my old email doesnt work so made a new account since forgot password lol and i dont go on mirc anymore.
Quote
$addtok has a format of:
$addtok(TextToAddTo,TextBeingAdded,Position,AsciiChar)
In the script above, it looks like there is only:
$addtok(TextToAddTo,TextBeingAdded,Position)
try:
Quote:
$addtok(%pollresults,[ $+ $gettok(%voteoptions,%toknum,9) $+ $gettok(%nforoptions,%toknum,44) ],0,32)
from what i remember (may be wrong) the last parameter is optional so if you leave the last one out then there is a null being added between each token so combines the strings.
Anyway the script was fine when i used to use it and im sure it didnt have any errors.
eugenio did u type !poll when u had the script yourself, if so then thats ur problem this script is used for a bot but can easily be changed to on input.
Quote
RESULTPOLLCODE Unknown command
erm and what is the point in /pollcode or w/e it is ?!?
/resultpollcode is a subroutine because im lazy and no point since i quit mirc ;p i can only assube that its an alias to neaten the coding, to save code repetition (possibly coz mine used to have an on input too)
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.