02.02.2013, 19:30
(
Последний раз редактировалось mamorunl; 02.02.2013 в 21:52.
)
Quote:
enums are like defines - in fact they're almost identical:
pawn Код:
pawn Код:
|
pawn Код:
enum mJob {
mID,
mCargo[50],
mTrailer,
Float:mTrailerX,
Float:mTrailerY,
Float:mTrailerZ,
Float:mTrailerA,
mCompanyFrom,
mCompanyTo,
mValue
};
pawn Код:
enum playerInfo {
mCurrentJob[mJob]
} // all other variables omitted for the sake of clarity
I get your defines way, but I can still redefine everything, even parts of an array.
Edit: OK, so I tried to put it outside the enum and make it like any other enum. I replaced my code with this:
pawn Код:
currentJob[playerid][mCargo] = jobs[playerid][jobid][mCargo];
printf("%s", currentJob[playerid][mCargo]);
printf("%s",jobs[playerid][jobid][mCargo]);
I tried to copy it with memcpy, as suggested as well, but all that did was give me an empty string (just like strmid btw)