PDA

View Full Version : Two lua "errors"



Zarestia
December 30th, 2022, 19:51
Developing extensions/ruleset I came accross two errors/bugs/issues whatever you want to call them. They don't seem to impact anyhting, but I just wanted to point them out :)

npc_skill.lua, line 42, brackets get escaped by backslash which is an invalid escape sequence, only square brackets may be escaped with backslashes

local nStarts, nEnds, sLabel, sSign, sMod = string.find(aClauses[i], "([%w%s\(\)]*[%w\(\)]+)%s*([%+%-�]?)(%d*)");

Instead this should still work just fine (at least in my testing):

local nStarts, nEnds, sLabel, sSign, sMod = string.find(aClauses[i], "([%w%s%(%)]*[%w%(%)]+)%s*([%+%-�]?)(%d*)");

manager.char_lua, line 1928, returns a variable which is not defined.

return aClassStats;

These could also be found in rulesets which are based on 3.5e (sfrpg/pfrpg2).