Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Bing

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 9:53 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
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 >>