03.02.2016, 10:38
(
Последний раз редактировалось PrO.GameR; 03.02.2016 в 21:38.
)
This is happening because you are miss-understanding what enum is, You can think of enum as constant variables that will be replaced by numbers at compile time, so a Money in enum is not a string, but rather a number (for example 6th element in an array), so "Money" as string is not equal to Money of an enum, what you can do is however making a nested if-else
UPDATE: I didn't actually know you can use a switch in this case, went ahead and tested, turns out you can't use it, so strcmp is your only way to do it I guess.
PHP код:
if(!strcmp(string,"Money"))
{
//Set his money bla bla bla
}