Help me with this mistake.
I'm trying to compile this
github.com
part of the error
..\src\item.cpp(654): error C2046: illegal case
1>..\src\item.cpp(675): error C2043: illegal break
I'm trying to compile this
Item custom attributes by Mkalo · Pull Request #1997 · otland/forgottenserver
Introducing 3 new methods to Item class to Lua API: item:setCustomAttribute(key, value) item:getCustomAttribute(key) item:removeCustomAttribute(key) Key types: string or number Value types: string,...
part of the error
Code:
case ATTR_CUSTOM_ATTRIBUTES: {
uint64_t size;
if (!propStream.read<uint64_t>(size)) {
return ATTR_READ_ERROR;
}
for (uint64_t i = 0; i < size; i++) {
// Unserialize key type and value
std::string key;
if (!propStream.readString(key)) {
return ATTR_READ_ERROR;
};
// Unserialize value type and value
ItemAttributes::CustomAttribute val;
if (!val.unserialize(propStream)) {
return ATTR_READ_ERROR;
}
setCustomAttribute(key, val);
}
break;
}