I'm adding the detail in my post to remind myself of stuff for when I look back, so don't be put off by it
The issue seems to be that DetermineNrOfSpellsToUnlearn is saying you could unlearn a level 0 spell (in prc_s_spellgain.nss). The conv script calls EvalPRCFeats 1s after closing, and that will reopen the conversation with the learn menu as you are then missing a level 0 spell, which will go round and round until you get sad and give up; yet for some reason that doesn't happen when real classes have the unlearn option? Interestingly, cls_spkn_duskbl.2da has different cantrip 0 known values to the tlk description used in the manual, I don't see how/why that would cause this problem though. Line 371 has a variable assignment during an if - something that I've never seen before (surely compilers won't like that?) and might want to investigate further.
It may be possible to get yourself out of it by tweaking a variable during the conversation. Until today I'd never really had to look at a dynamic conversation script in great detail, and I found it a little difficult to follow. I'll have another look at that whenever I find myself with the time, which probably won't be tomorrow
A couple of questions for you...
1) Is your character only duskblade 8 when this happens? No other classes, and you're not actually level 9 when the conversation pops up?
2) What values are you using for the following switches? (PRC options -> Alter code switches can tell you this)
- PRC_BIO_UNLEARN
- PRC_UNLEARN_SPELL_MAXNR (well I see you changed it, but what was it originally?)
There's a few more things that might help, such as what turning on the PRC_DEBUG switch does, but I'm hoping that won't be necessary.