However recently my interest has been sparked again for various reasons, I've set up my old test IRC server again, fired up a couple of bots and been playing with some of my old scripts. Unfortunately to say my TCL is rusty would be a major understatement, I'm trying to fix a couple of niggly little bugs on my old script "Trivia 2000" before moving on to develop the addons that I started years ago and never finished. I've been having to re-aquaint myself with all the code I wrote back then and try and remember what does what and why I wrote it that way. Basically I'm looking for help on a couple of minor issues preparing for a new release if I can get my rear end in gear (primarily because a room I'm in these days is using it and wants some enhancements).
So the bugs and relevant code I could do with a prod in the right direction for are:
The answer file is structured as one question per line with the answer then a colon then the question like so:
answer1:this is question1
answer2:this is question2
etc etc
One of the limitations of Trivia 2000 has always been that it only accepts one word answers in the question files which I never got round to fixing when I knew enough about TCL and dont stand a chance fixing now until I've taught myself it all again. I'm fairly sure one of you guys could fix it in a flash so the code that gets the answer is as below.
Code: Select all
set ques_pair [lindex $quest $questionno]
set puzzle [lindex [split $ques_pair :] 1]
set ques_split [split $ques_pair :]
set answer [lreplace $ques_split 1 1]
As well as this, I have a little issue where if one of the answers is a number it takes the first digit as a colour code and then presents the answer in that colour minus the first digit, so 1963 would show up as 963 but in green, again, a minor bug I never dealt with at the time and simply dont have th coding knowledge to deal with now. I imagine this will simply be an edit of the last line of the above code changing the way it reads in the answer code and presents it to the proc as a variable but need some help please guys.
Once I've worked out all the code I started writing years ago for the new version I may actually get round to finishing it and releasing it........IF I can get TCL back into my brain again.
Thanks guys