i have a script with a custom property that references a template.
If I print(propTemplate), it outputs:
EBD19003D07A9E14:Advanced Assault Rifle
How do I get just the name? If I try propTemplate.name I get "nil"
i have a script with a custom property that references a template.
If I print(propTemplate), it outputs:
EBD19003D07A9E14:Advanced Assault Rifle
How do I get just the name? If I try propTemplate.name I get "nil"
Since I cannot find an alternative in the API, I ended up regex it out with this function (since Lua doesn't have a split command)
function split(s, delimiter)
result = {};
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
end
return result;
end