The Dink Network

Reply to Re: Dink Engine bug - global variables get confused

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 9th 2002, 05:42 AM
wizardg.gif
Paul
Peasant He/Him United States
 
: I've come across a bug... or rather WC did, in PQ in which the powerful magic spells are instantly recharged.

: It seems that the global varilables &magic_level and &magic_cost get confused with the variable &magic (as all three have the first 5 letters in common) so that if your &magic is say 18 then &magic_level becomes 18_level and &magic_cost becomes 18_cost.

: When this happens and you arm a new weapon (not magic, arming a new magic resets things properly, though I don't know why) - you get instant (in human time) magic... be it Deus Strike or whatever.

: I can't think of a way around this as I can't guarantee what magic is in which slot (or I'd do a quick change magic to fireball, arm it, change to &cur_magic and re-arm it) - compare_magic doesn't work, of course.

: Any takers on this one?

I've incountered similar, though I not quite sure I understand the problem your're describing. I know that &magic_level will become 18_level (where 18 is &magic) if used in a say command and I think also be treated as 18 in an if statment, but it work correctly in an an assignment statment (which may be the only place it works right), does that explain anything?

I don't quite understand the bug, I didn't notice anything odd when arming weapons.