Enum Information returns C?
#1

hi, I made my first enum ever...
an enum to easly make missions in my script, instead of adding 50 lines per mission, I try to do it with maybe 5 lines per mission...

anyways this is what I have:
pawn Code:
enum DMissions
{
    mission_name[200],
    person_name[200],
    pick_place[50],
    deliver_place[50],
    mission_type,
    Float:pick_x,
    Float:pick_y,
    Float:pick_z,
    Float:deliver_x,
    Float:deliver_y,
    Float:deliver_z
};

new Mission[6][DMissions]=
{
//==============================================================================
//Mission TYPE 1
//==============================================================================
    {"Travis Pastrana Is Going to participate the X-games", "Travis Pastrana""The Hollywood Hotel",  "The Stadium"1,  \
    334.4390,-1519.8026,35.7015,
    2732.6616,-1841.6346,9.9145},
   
    {"Chris Martin is back from his smash concert in the Stadium VIVA LA VIDA man!",    "Chris Martin", "The Stadium",  "Chris Martin's Hotel",  1, \
    2732.6616,-1841.6346,9.9145,
    1737.9714,-1270.4094,13.5441},
   
//==============================================================================
//Mission TYPE 2
//==============================================================================
   
    {"The Pope has a meeting with Barack Obama",    "The Pope", "The Airport",  "The White House",  2,  \
    1682.4960,-2290.7954,13.0821,
    1122.9896,-2036.9480,69.8938},
   
    {"Herman Van Rompuy, President of Europe has a meeting with Barack Obama""Herman Van Rompuy",    "The Airport",  "The White House",  2,  \
    1682.4960,-2290.7954,13.0821,
    1122.9896,-2036.9480,69.8938},
   
//==============================================================================
//Mission TYPE 3
//==============================================================================
   
    {"Barack Obama has arrived from his trip to Mexico",    "Barack Obama", "The Airport",  "The White House",  3,  \
    1682.4960,-2290.7954,13.0821,
    1122.9896,-2036.9480,69.8938},
   
    {"Rob Dyredek has arrived at the airport""Rob Dyredek""The Airport",  "Dyrdek's House",  3,   \
    1682.4960,-2290.7954,13.0821,
    974.4201,-819.5055,96.6825}
};
ok, so I did not try to make extremely hard functions at the beginning, just some easy stuff to test if I fully understand the way to use this stuff...

ok so the little test code:
pawn Code:
if (strcmp("/mission1", cmdtext, true) == 0)
    {
        new
            string[200],
            mName = Mission[1][mission_name],
            mPName = Mission[1][person_name];
        format(string,sizeof(string),"%s",mName);
        SendClientMessage(playerid, COLOR_YELLOW_LABEL, string);
        format(string,sizeof(string),"%s",mPName);
        SendClientMessage(playerid, COLOR_YELLOW_LABEL, string);
        return 1;
    }
Ok, I compile, and get no errors, so I think that I'm on the good way
but when I go in game i get the following message when I type /mission1

C
CCC

so that means that my first string returned as C
and the second as CCC
... I have no Idea why it gets C...
and why it does not do what it should do...

Thanks in advance
Reply


Messages In This Thread
Enum Information returns C? - by knackworst - 01.10.2011, 18:50
Re: Enum Information returns C? - by [MWR]Blood - 01.10.2011, 19:01
Re: Enum Information returns C? - by kacper55331 - 01.10.2011, 19:07
Re: Enum Information returns C? - by knackworst - 01.10.2011, 19:10
Re: Enum Information returns C? - by [MWR]Blood - 01.10.2011, 19:12
Re: Enum Information returns C? - by knackworst - 01.10.2011, 19:14
Re: Enum Information returns C? - by [MWR]Blood - 01.10.2011, 19:16
Re: Enum Information returns C? - by knackworst - 01.10.2011, 19:18
Re: Enum Information returns C? - by [MWR]Blood - 01.10.2011, 19:23
Re: Enum Information returns C? - by knackworst - 01.10.2011, 19:34
Re: Enum Information returns C? - by MadeMan - 01.10.2011, 19:40
Re: Enum Information returns C? - by knackworst - 01.10.2011, 19:47
Re: Enum Information returns C? - by [MWR]Blood - 01.10.2011, 19:49
Re: Enum Information returns C? - by knackworst - 01.10.2011, 19:55
Re: Enum Information returns C? - by MadeMan - 01.10.2011, 19:56
Re: Enum Information returns C? - by knackworst - 01.10.2011, 20:27
Re: Enum Information returns C? - by MadeMan - 01.10.2011, 20:42
Re: Enum Information returns C? - by knackworst - 01.10.2011, 20:57
AW: Enum Information returns C? - by Nero_3D - 01.10.2011, 21:19
Re: Enum Information returns C? - by knackworst - 01.10.2011, 21:27
AW: Re: Enum Information returns C? - by Nero_3D - 01.10.2011, 21:40
Re: Enum Information returns C? - by knackworst - 01.10.2011, 21:47
AW: Re: Enum Information returns C? - by Nero_3D - 01.10.2011, 22:20
Re: Enum Information returns C? - by knackworst - 01.10.2011, 22:26
AW: Re: Enum Information returns C? - by Nero_3D - 01.10.2011, 22:48
Re: Enum Information returns C? - by knackworst - 01.10.2011, 22:51
Re: Enum Information returns C? - by knackworst - 02.10.2011, 00:31
AW: Re: Enum Information returns C? - by Nero_3D - 02.10.2011, 01:46
Re: Enum Information returns C? - by knackworst - 02.10.2011, 01:48
AW: Re: Enum Information returns C? - by Nero_3D - 02.10.2011, 02:03

Forum Jump:


Users browsing this thread: 12 Guest(s)