Help me please
#1

Hey guys, i have tried to fix these errors by myself but couldn't after trying very hard so i came here.
Can someone please help me to fix these stuffs?

pawn Код:
new ACmdTopics[][50] =
{
    {"General Commands"},
    {"General Commands 2"},
    {"Convoy Commands"},
    {"House/Business Commands"}
};


enum TCmdItem
{
    CmdID,
    CmdText[200]
}
new ACmdText[][TCmdItem] =
{
    {CmdIDGeneral, "{FFFFFF}/w - Wishper talk"},
    {CmdIDGeneral, "{FFFFFF}/me - Show your action"},
    {CmdIDGeneral, "{FFFFFF}/slimit - To see the speedlimits"},
    {CmdIDGeneral, "{FFFFFF}/tlon - Turn Trailer's lights ON"},
    {CmdIDGeneral, "{FFFFFF}/tloff - Turn Trailer's lights OFF"},
    {CmdIDGeneral, "{FFFFFF}/sync - Syncromize yourself"},
    {CmdIDGeneral, "{FFFFFF}/myrank - View your current Trucker Rank"},
    {CmdIDGeneral, "{FFFFFF}/afk - Go Away From Keyboard"},
    {CmdIDGeneral, "{FFFFFF}/back - Back from being Away From Keyboard"},
    {CmdIDGeneral, "{FFFFFF}/pm - Send a Private Message to other player"},
    {CmdIDGeneral, "{FFFFFF}/cp - Change your password"},
    {CmdIDGeneral, "{FFFFFF}/classhelp - View the help list for each classes"},
    {CmdIDGeneral, "{FFFFFF}/report - Report other player to online admins"},
    {CmdIDGeneral, "{FFFFFF}/vips - Display the online VIP players"},
    {CmdIDGeneral, "{FFFFFF}/po - Give a Pull-Over warning to the player as a cop"},
    {CmdIDGeneral, "{FFFFFF}/fine - Fine a wanted player as a cop"},
    {CmdIDGeneral, "{FFFFFF}/backup - Ask for a backup as a cop"},
    {CmdIDGeneral, "{FFFFFF}/spike - Place a spikestrip as a cop"},
    {CmdIDGeneral, "{FF0000}See General Commands 2 to see other commands"},

    {CmdIDGeneral2, "{FFFFFF}/ranks - View the list of all the Trucker Ranks"},
    {CmdIDGeneral2, "{FFFFFF}/rules - View the server rules"},
    {CmdIDGeneral2, "{FFFFFF}/r - Talk on a radio with the players of your class"},
    {CmdIDGeneral2, "{FFFFFF}/givemoney - Give your money to other players"},
    {CmdIDGeneral2, "{FFFFFF}/assist - Call for an assistance to repair your vehicle"},
    {CmdIDGeneral2, "{FFFFFF}/stats - View all of your statistics"},
    {CmdIDGeneral2, "{FFFFFF}/admins - Display the online administrators"},
    {CmdIDGeneral2, "{FFFFFF}/l - Turn your vehicle's lights ON"},
    {CmdIDGeneral2, "{FFFFFF}/loff - Turn your vehicle's lights OFF"},
    {CmdIDGeneral2, "{FFFFFF}/engine - Turn on your vehicle's engine"},
    {CmdIDGeneral2, "{FFFFFF}/fuelup - Refuel your vehicle at the nearest gas station"},
    {CmdIDGeneral2, "{FFFFFF}/switchdepot[/sd] - Select another Depot of your class"},
    {CmdIDGeneral2, "{FFFFFF}/work - Take a work as a trucker class"},
    {CmdIDGeneral2, "{FFFFFF}/takeflight - Take a flight as a pilot class"},
    {CmdIDGeneral2, "{FFFFFF}/stopwork - Stop the work of any class"},
    {CmdIDGeneral2, "{FFFFFF}/switchsclass[/sc] - Change your class"},
    {CmdIDGeneral2, "{FFFFFF}/flip - Flip your vehicle"},
    {CmdIDGeneral2, "{FFFFFF}/detach - Detach the trailer from your truck"},


    {CmdIDConvoy, "{FFFFFF}/convoy - Create or join the convoy"},
    {CmdIDConvoy, "{FFFFFF}/convoykick - Kick a player from your convoy"},
    {CmdIDConvoy, "{FFFFFF}/convoymembers - View the list of the convoy members"},
    {CmdIDConvoy, "{FFFFFF}/convoyleave - Leave the convoy that you have joined"},
    {CmdIDConvoy, "{FFFFFF}/convoycancel - Cancel your convoy"},
    {CmdIDConvoy, "{FFFFFF}/convoyhelp - See the information of the convoy"},

    {CmdIDHouseBus, "{FFFFFF}/buyhouse - Buy nearest available house"},
    {CmdIDHouseBus, "{FFFFFF}/buybus - Buy nearest available business"},
    {CmdIDHouseBus, "{FFFFFF}/enter - Enter in your house or business"},
    {CmdIDHouseBus, "{FFFFFF}/gohome - Teleport yourself to your houses"},
    {CmdIDHouseBus, "{FFFFFF}/Gobus - Teleport yourself to your businesses"},
    {CmdIDHouseBus, "{FFFFFF}/getcar - Spawn the vehicle that you have bought"},
    {CmdIDHouseBus, "{FFFFFF}/park - Park your vehicle near your house"},
    {CmdIDHouseBus, "{FFFFFF}/housemenu - Display the menu for your house"},
    {CmdIDHouseBus, "{FFFFFF}/busmenu - Display the menu for your business"}
};
pawn Код:
CmdList_Create(playerid)
{
    new CmdList[1000], DialogTitle[128];

    format(DialogTitle, 128, "Server Commands");

    for (new i; i < sizeof(ACmdTopics); i++)
    {
        format(CmdList, 1000, "%s%s\n", CmdList, ACmdTopics[i]);
    }
    ShowPlayerDialog(playerid, DialogCmdItemChosen, DIALOG_STYLE_LIST, DialogTitle, CmdList, "Select", "Cancel");

    return 1;
}
And this is the dialog process
pawn Код:
Dialog_CmdItemChosen(playerid, response, listitem)
{
    if(!response) return 1;

    new DialogTitle[128];

    format(DialogMsg5000, 5000, "");

    format(DialogTitle, 128, ACmdTopics[listitem]);

    for (new i; i < sizeof(ACmdText); i++)
    {
        if (ACmdText[i][CmdID] == listitem)
        {
            format(DialogMsg5000, 5000, "%s%s\n", DialogMsg5000, ACmdText[i][CmdText]);
        }
    }
    ShowPlayerDialog(playerid, DialogCmdItem, DIALOG_STYLE_MSGBOX, DialogTitle, DialogMsg5000, "Back", "Cancel");

    return 1;
}

Dialog_CmdItem(playerid, response)
{
    if(!response) return 1;

    CmdList_Create(playerid);

    return 1;
}
And the errors i get:
pawn Код:
C:\Users\bijay\Desktop\xDDD\pawno\include\PPC_Defines.inc(1040) : error 017: undefined symbol "CmdIDGeneral"
C:\Users\bijay\Desktop\xDDD\pawno\include\PPC_Defines.inc(1060) : error 055: start of function body without function header
C:\Users\bijay\Desktop\xDDD\pawno\include\PPC_Defines.inc(1080) : error 055: start of function body without function header
C:\Users\bijay\Desktop\xDDD\pawno\include\PPC_Defines.inc(1087) : error 055: start of function body without function header
C:\Users\bijay\Desktop\xDDD\pawno\include\PPC_Defines.inc(1096) : error 010: invalid function or declaration
C:\Users\bijay\Desktop\xDDD\gamemodes\PPC_Trucking.pwn(1607) : warning 203: symbol is never used: ""
Sorry to post the long thread.

PS: I have made an admin commands list in the same process and its working fine.
Reply
#2

Can you tell me which lines the errors are on?

EDIT: Do you have "CmdIDGeneral" defined somewhere?
Reply
#3

Nope, i haven't defined it. Can you tell me how to define it? Plus, i get this error too
pawn Код:
C:\Users\bijay\Desktop\xDDD\gamemodes\PPC_Trucking.pwn(1607) : warning 203: symbol is never used: ""
At the line
pawn Код:
{CmdIDGeneral, "{FFFFFF}/me - Show your action"},
I searched everywhere for that "" symbol but there isn't any. If i remove the whole enums, it won't give any error only when i place them back.

Help plz :\
Reply
#4

From what I understand, this is supposed for either a /help dialog or a /help command? In my opinion, you'd be better off using a normal /help command (with SendClientMessages).

Nevertheless, where did you get these functions from?
Reply
#5

Quote:
Originally Posted by Mionee
Посмотреть сообщение
From what I understand, this is supposed for either a /help dialog or a /help command? In my opinion, you'd be better off using a normal /help command (with SendClientMessages).

Nevertheless, where did you get these functions from?
It was for help dialog and i made an admin command list by modifying the help list.

Now i want to make the list of all the server commands in the same way. The server has lots of commands so i can't add them on one single dialog or using SendClientMessage. So i thought using this method would be better.
Reply
#6

It probably is however (if I'm right; since I'm very bad with arrays) you need to define the options you want, (i.e. CmdIDGeneral, CmdIDGeneral1, CmdIDGeneral2, etc, etc), along with the string sizes? Something like that. I'll ask a few friends to check this out though since I have no idea.
Reply
#7

Just define them each one of them with a unique number. It starts from 0 since it compares with listitem.

pawn Код:
#define     CmdIDGeneral            (0)
#define     CmdIDGeneral2           (1)
#define     CmdIDConvoy             (2)
#define     CmdIDHouseBus           (3)
Reply
#8

Thanks guys, it worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)