Enums help
#1

I made something like that:

tCameraSpot and tCameraLookAt has three spaces, array.
I tried to set their variables through the new TutorialPlaces and it didn't work out.

pawn Код:
enum TUT_SPOTS
{
    Float:tCameraSpot[3],
    Float:tCameraLookAt[3],
    tText[128]
}

new TutorialPlaces[][TUT_SPOTS] = {
{1668.3604,-2308.7495,-0.1835, 1644.9135,-2329.9458,-2.6797, "Airport test 1"},
{1721.4801,-2264.8171,-0.1987, 1741.2997,-2251.1802,-2.8516,-2.6797, "Airport test 2"}
};
Reply
#2

You have an extra variable in your second line.
Reply
#3

After I removed the extra variable, I have got this problem:

pawn Код:
C:\Users\Paul\Desktop\Vision RolePlay\pawno\include\Server\Enums.pwn(22) : warning 213: tag mismatch
C:\Users\Paul\Desktop\Vision RolePlay\pawno\include\Server\Enums.pwn(22) : warning 227: more initiallers than enum fields
Reply
#4

enum TUT_SPOTS
{
Float:tCameraSpot[3],
Float:tCameraLookAt[3],
tText[128]
}

new TutorialPlaces[][TUT_SPOTS] = {
{{1668.3604,-2308.7495,-0.1835}, {1644.9135,-2329.9458,-2.6797}, "Airport test 1"},
{{1721.4801,-2264.8171,-0.1987}, {1741.2997,-2251.1802,-2.8516}, (-2.6797 what? delete this), "Airport test 2"}
};
Reply
#5

So this is how it works , thank you kind sir.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)