Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
AFKMud 2.2.2
Mar 3, 2019 5:35 pm
By Samson
Development
Nov 28, 2018 12:10 pm
By Keirath
First Immortal
Oct 12, 2018 2:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018 7:31 pm
By joeyfogas
question on overland code
May 31, 2018 12:03 pm
By joeyfogas
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
AFKMud 2.2.2
Author: AFKMud Team
Submitted by: Samson
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Bing

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
483
3,743
19,401
655
RodrickMci
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug] Formatting in the showc...
Forum Rules | Mark all | Recent Posts

[Bug] Formatting in the showclass command looks ugly
< Newer Topic :: Older Topic > AFKMud 2.0

Pages:<< prev 1 next >>
Post is unread #1 Jan 6, 2007 11:53 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,647
JoinedJan 1, 2002

Bug: Formatting in the showclass command looks ugly
Danger: Trivial - Output formatting only.
Discovered in: AFKMud 2.0
Found by: Samson
Fixed by: Samson

---

act_wiz.cpp, do_showclass

Locate:
   ch->pagerf( "&wStarting Weapon:  &W%-5.5d &wStarting Armor:     &W%-5d\r\n", Class->weapon, Class->armor );
   ch->pagerf( "&wStarting Legwear: &W%-5.5d &wStarting Headwear:  &W%-5d\r\n", Class->legwear, Class->headwear );
   ch->pagerf( "&wStarting Armwear: &W%-5.5d &wStarting Footwear:  &W%-5d\r\n", Class->armwear, Class->footwear );
   ch->pagerf( "&wStarting Shield:  &W%-5.5d &wStarting Held Item: &W%-5d\r\n", Class->shield, Class->held );
   ch->pagerf( "&wMax Skill Adept:  &W%-3.3d &wBaseThac0: &W%-5.5d &wThac0Gain: &W%f\r\n",
               Class->skill_adept, Class->base_thac0, Class->thac0_gain );


Change to:
   ch->pagerf( "&wStarting Weapon:  &W%-6d &wStarting Armor:     &W%-6d\r\n", Class->weapon, Class->armor );
   ch->pagerf( "&wStarting Legwear: &W%-6d &wStarting Headwear:  &W%-6d\r\n", Class->legwear, Class->headwear );
   ch->pagerf( "&wStarting Armwear: &W%-6d &wStarting Footwear:  &W%-6d\r\n", Class->armwear, Class->footwear );
   ch->pagerf( "&wStarting Shield:  &W%-6d &wStarting Held Item: &W%-6d\r\n", Class->shield, Class->held );
   ch->pagerf( "&wBaseThac0:        &W%-6d &wThac0Gain: &W%f\r\n", Class->base_thac0, Class->thac0_gain );
   ch->pagerf( "&wMax Skill Adept:  &W%-3d ", Class->skill_adept );


The formatting tags in this command made the output on the left side look ugly because it was adding leading zeros to the numbers which was not desired. It would also mess up the flow if a vnum was > 5 digits. So it makes room enough for 6 digits to be nicely displayed.
       
Pages:<< prev 1 next >>