View Single Post
09/16/15, 05:53 PM   #7
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Originally Posted by merlight View Post
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.
I wrote this program a year ago. Its .NET not LUA and I don't even generate the data anymore, I threw all in with Master Merchant.

What good would changing my working code?

Again, I'm not writing 1 line of LUA, just parsing it.

Originally Posted by merlight View Post
Item links don't carry information about quantity.
OK, I was wrong about it's use. As I said this is just for my code and I was just asking other users for items.

You are correct I do use replacement:

Code:
                    line = Replace(line, "^p", "", 1, -1)
                    line = Replace(line, "^ns", "", 1, -1)
                    line = Replace(line, "^n", "", 1, -1)
You are correct the middle line did not exist in the previous version and that's where I got my s from.

here is the only thing I can tell you for sure then, it works for me and my program so the data is consistent.

I said this has no bearing on ANY in game code and I thought maybe I found something (which you proved incorrect).

There is only ^ns on the type of items I showed you, you can draw your own conclusions, I just needed a marker to correct incoming data. For me the ^ns was a gift from the LUA gods.

Lua Code:
  1. ["itemLink"] = "|H0:item:533:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hsanded oak^ns|h"
  2. ["itemLink"] = "|H0:item:794:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hrawhide^ns|h"
  3. ["itemLink"] = "|H0:item:803:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hsanded maple^ns|h"
  4. ["itemLink"] = "|H0:item:818:30:46:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hrough birch^ns|h"
  5. ["itemLink"] = "|H0:item:46131:30:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|hKresh Fiber^ns|h"

Feel free to draw your own conclusion - I just pointed out a pattern I saw and it works for me.

All I wanted to do was get a few more items from users of GSA before the update.

My new version works fine, I made the necessary changes and that's all I was looking to do.

Now maybe someone can figure out why only raw crafting items have that ^ns ... maybe it's useful for something. There is no denying there is a pattern.

-d
  Reply With Quote