View Single Post
Old November 1, 2011, 13:42   #1
PowerWyrm's Avatar
Join Date: Apr 2008
Posts: 2,907
PowerWyrm is on a distinguished road
[3.3.x] Cannot suicide characters

The suicide command doesn't work in 3.3.x due to the fact that keypresses were changed to a structure: "code" + "mods".

		/* Special Verification for suicide */
		prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
		ch = inkey();
		prt("", 0, 0);
		if (ch.code != '@') return;
In this case, struct keypress ch is filled with code = '0' and mods = KC_MOD_CONTROL + KC_MOD_ALT. The check should be more explicite.
PWMAngband variant maintainer - check (or to learn more about this new variant!
PowerWyrm is offline   Reply With Quote