Initialize Enum Value
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
1) That tutorial says nothing of the sort. It mentions that syntax, then goes on to explain what it is used for (and if you still need clarification, that's what pawn-lang.pdf is for).

2) PAWN is not C++! Just because you can do something in an entirely different language that happens to look a little superficially similar, does NOT mean you can do it in PAWN. If you want to learn C++, that's fine; if you want to learn PAWN, that's fine; just don't assume that ANY knowledge translates!
Код:
enum
    e_PlayerInfo
{
    SCORE,
    MONEY = 9,
    KILLS = 5,
    DEATHS = 56
};

new pInfo[MAX_PLAYERS][e_PlayerInfo];

printf("%i | %i | %i | %i", pInfo[0][SCORE], pInfo[0][MONEY], pInfo[0][KILLS], pInfo[0][DEATHS]);
That is literally pulled from the thread and shows exactly what I want.

I didn't say PAWN was C++ or any other language. I couldn't find what I was looking for in pawn-lang.pdf (I'm sure it's in there somewhere but I couldn't find it). Also, from my experience with C++ and previous research, the syntax is extremely similar so I thought I would try it, and according to that thread it's identical (at least in the case of enumerators).
Reply


Messages In This Thread
Initialize Enum Value - by admiralspeedy - 14.11.2014, 05:56
Re: Initialize Enum Value - by Quickie - 14.11.2014, 09:51
Re: Initialize Enum Value - by admiralspeedy - 14.11.2014, 13:57

Forum Jump:


Users browsing this thread: 2 Guest(s)