• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

HELP item custom attr

jel

Member
Joined
Mar 22, 2014
Messages
302
Reaction score
12
Help me with this mistake.

..\src\item.cpp(654): error C2046: illegal case
1>..\src\item.cpp(675): error C2043: illegal break

I'm trying to compile this

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;
        }
 
Back
Top