View Single Post
12-30-18, 10:02 AM   #15
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Seerah View Post
First, there should be no apostrophe in "Characters". Oh, and your totalAllianceGold variable was misspelled, but at least it matched everywhere.

Second, you're getting the gaps because you're adding the gaps. (Oh, and you also don't need to add a double-line to create a spacer, it can just be a regular line. This way you don't end up with more strings created in memory than necessary.)

...

For example, I've commented above how it is that you are getting 4 blank lines instead of one if you have only neutral characters on a server.

If you follow the logic of what you are trying to do, you want an empty line (a spacer) after every faction's section. This is even true for the last displayed faction in the tooltip, since you want a spacer before the total gold on the realm. If a faction's info will not be present in the tooltip, then you don't need the spacer. If you wish to keep your code formatted as is (rather than jlam's condensed version), then do this instead.

...
Thank You for the help, I did need to change one thing for it to work correctly and that was to change GameTooltip:AddLine("")


to GameTooltip:AddLine(" ")

because without the space the gap was not added. but thank you very much.

Also thanks for the spell check

Coke
  Reply With Quote