• 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!

Question about enum's in C++

artofwork

Well-Known Member
Joined
Dec 3, 2008
Messages
420
Reaction score
61
How do you asign multiple enum's to one another.

Its been a number of years since I've worked with C++


example:

PHP:
enum skills_t
{
	SKILL_FIRST = 0,
	SKILL_FIST = SKILL_FIRST,
	SKILL_CLUB = 1,
	SKILL_SWORD = 2,
	SKILL_AXE = 3,
	SKILL_DIST = 4,
	SKILL_SHIELD = 5,
	SKILL_FISH = 6,
	MAGLEVEL = 7,
	LEVEL = 8,
	SKILL_ALL = 9,
	SKILL_ALL = SKILL_CLUB | SKILL_SWORD | SKILL_AXE | SKILL_DIST,
	SKILL_LAST = SKILL_FISH
	
};

this is what i get as a result of this.

PHP:
18:48 You advanced in magic level [1].
18:48 You advanced in magic level [2].
18:48 You advanced in magic level [3].
18:48 You advanced in magic level [4].
18:48 You advanced in magic level [5].
18:48 You advanced in magic level [6].

It doesn't change my magic level only my fists skills
 
what are we suppose to do here if we don't see code?;o You showed enum and msg that appeared in tibia client, but how can we know what is that and what you want to achieve? Give more info
 
what are we suppose to do here if we don't see code?;o

I think the question is pretty straight forward, i asked how do you assign multiple enum's to one another (if that is possible in c++) and gave a small example.

Any additional code is not neccessary

You showed enum and msg that appeared in tibia client, but how can we know what is that and what you want to achieve? Give more info

What i want to achieve with the enum's, is assign SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DIST to SKILL_ALL.
 
Back
Top