I'm using the following trigger to parse my inventory...
The list looks like one of the following...
Specifically, the issue is with the delior's_pocket_dimension skill... this one, because it only has a single space, fails to remove the :, unlike the others... the normal ones parse like this...
As you can see, delior's_pocket_dimension fails, including having a : remaining in its name.
Basically, I'm trying to see if there's a better way to have it parse the names, removing all ending spaces in the skill names. The main issue is that spaces may be found in the skill names, as well as their descriptive names, and I haven't found a better way to get results. This works perfectly except for with this one skill.
<triggers>
<trigger
keep_evaluating="y"
match="^([a-z#_\' -:]*) ([a-zA-Z\ .]*)$"
name="skill_line"
regexp="y"
send_to="12"
sequence="50"
>
<send>local SkillName = string.gsub("%1", ":%s+$", "")
local SubName = string.gsub(SkillName, "[ '#-]", "_")
local SkillLevel = string.gsub("%2", "[.]", "")
skill_table[SubName] = skill_table[SubName] or {}
skill_table[SubName].name = SkillName
skill_table[SubName].level = SkillLevel
skill_table[SubName].count = GetVariable (SubName .. "_skill")
</send>
</trigger>
</triggers>The list looks like one of the following...
delior's_pocket_dimension: Proficient.
language#southern: Not Very Good.
stone working: Poor.
Specifically, the issue is with the delior's_pocket_dimension skill... this one, because it only has a single space, fails to remove the :, unlike the others... the normal ones parse like this...
Quote:
delior's_pocket_dimension: nil Proficient
language#southern 68 Not Very Good
stone working 30 Poor
delior's_pocket_dimension: nil Proficient
language#southern 68 Not Very Good
stone working 30 Poor
As you can see, delior's_pocket_dimension fails, including having a : remaining in its name.
Basically, I'm trying to see if there's a better way to have it parse the names, removing all ending spaces in the skill names. The main issue is that spaces may be found in the skill names, as well as their descriptive names, and I haven't found a better way to get results. This works perfectly except for with this one skill.