Hey! 
I'm currently working on a project where I need to set a custom attribute in the source code and then access it in Lua. Here's what I've done so far:
In Source Code:
newItem->setIntAttr(ITEM_ATTRIBUTE_CORPSEOWNER, 321);
newItem->setCustomAttribute("TEST", "123");
In Lua:
print(item:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER))
print(item:getCustomAttribute("TEST"))
Console Output:
321.0
nil
As you can see, while the integer attribute ITEM_ATTRIBUTE_CORPSEOWNER returns the expected value of 321, the custom attribute "TEST" returns nil. I've tried different variations of setCustomAttribute, with and without quotation marks around the value, but this is the only way that allows the code to compile.
-- BlackTek server (based on TFS 1.4.2)

I'm currently working on a project where I need to set a custom attribute in the source code and then access it in Lua. Here's what I've done so far:
In Source Code:
newItem->setIntAttr(ITEM_ATTRIBUTE_CORPSEOWNER, 321);
newItem->setCustomAttribute("TEST", "123");
In Lua:
print(item:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER))
print(item:getCustomAttribute("TEST"))
Console Output:
321.0
nil
As you can see, while the integer attribute ITEM_ATTRIBUTE_CORPSEOWNER returns the expected value of 321, the custom attribute "TEST" returns nil. I've tried different variations of setCustomAttribute, with and without quotation marks around the value, but this is the only way that allows the code to compile.
-- BlackTek server (based on TFS 1.4.2)