View Single Post
09/16/15, 05:26 PM   #8
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by dopiate View Post
I am talking strictly for how my addon handles data :-)

I do understand the item link string but I wrote a .Net routine more than a year ago and it handled that string just fine until I started seeing plurals in my offline database.
You're not seeing plurals. You're seeing what's probably the result of wrongly removing "^n" and leaving the trailing "s" in place. Why not just use zo_strformat, you wouldn't even notice they changed something had you used that before saving the strings.

Originally Posted by dopiate View Post
I can tell you with 100% certainty that ^ns does mean an item is multiples of that item. I have seen it nowhere else and it works for me perfectly. It seems to only apply to raw materials for crafting.
I've just split a stack of sanded maple in my bank:
slot 204 ... 21 Sanded Maple ... GetItemLink(2, 204) returns "sanded maple^ns"
slot 236 ... 1 Sanded Maple ... GetItemLink(2, 236) returns "sanded maple^ns"

Item links don't carry information about quantity.


edit: tried it with and without the 's' flag out of curiosity:
Lua Code:
  1. zo_strformat("<<2[1/$d]>> <<tm:1>>", "sanded maple^ns", 5)
  2. -- 5 Sanded Maple
  3.  
  4. zo_strformat("<<2[1/$d]>> <<tm:1>>", "sanded maple^n", 5)
  5. -- 5 Sanded Maples

Last edited by merlight : 09/16/15 at 05:30 PM.
  Reply With Quote