[HELP] Tag Mismatch
#1

Hey guys i have been tryibng to figure this out, i was going to make a commands dialog my own way and keep getting
Код:
 C:\Documents and Settings\SAMP\Desktop\91.121.237.253_7847\filterscripts\Commands.pwn(15) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
here is the whole code (its small as i have just started to write it and can not figure out why i keep getting this warning).

Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#define COMMANDZ "Player\nVehicle"

enum DIALOGS
{
    DIALOG_COMMANDZ,
}

CMD:cmds(playerid, params[])
{
	ShowPlayerDialog(playerid, DIALOG_COMMANDZ, DIALOG_STYLE_LIST, "COMMANDS", COMMANDZ, "Close", "");
	return 1;
}
i have used ShowPlayerDialog in many of my scripts and some reason now it just keeps giving this warning. i feel quite stupid and this is the last place i would come as normally i research (did some research and none helped the problem) and figure it out myself. i now feel tired and maybe thats why i can see the problem.

Thanks for any help in advance.
Reply
#2

Change the define name to something else like COMMANDS.
Reply
#3

Define the dialogid instead of enclosing it in an enum
Reply
#4

pawn Код:
ShowPlayerDialog(playerid, DIALOG_COMMANDZ, DIALOG_STYLE_LIST, "COMMANDS", "You must put something here\n1...\n2...", "Select", "");
Reply
#5

it is still giveing out the same Tag mismatch :S

edit - thanks DavidBilla your advice worked. i gave you rep but i need to wait till 50 posts. Thanks again everyone for your help
Reply
#6

Quote:
Originally Posted by M0HAMMAD
Посмотреть сообщение
pawn Код:
ShowPlayerDialog(playerid, DIALOG_COMMANDZ, DIALOG_STYLE_LIST, "COMMANDS", "You must put something here\n1...\n2...", "Select", "");
i do have something there.


SOLVED BY DavidBilla
EDIT- sorry about the double post.
Reply
#7

Quote:
Originally Posted by Jakwob
Посмотреть сообщение
thanks DavidBilla your advice worked. i gave you rep but i need to wait till 50 posts. Thanks again everyone for your help
You're welcome
We're here to help regardless of whether we get the rep or not
Reply
#8

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#define COMMANDZ "Player\nVehicle"

#define DIALOG_ID_COMMANDZ 256 // You may use any number that is not in use.

CMD:cmds(playerid, params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid, DIALOG_ID_COMMANDZ, DIALOG_STYLE_LIST, "COMMANDS", COMMANDZ, "Close", "");
    return 1;
}
Reply
#9

Did you actually read what I said?
It has nothing to do with the enum. He can use dialogs in enums.

The problem was he actually defined COMMANDZ and he used it in the enum DIALOG_COMMANDZ
So it was DIALOG_"Player\nVehicle"
Reply
#10

i get you Stinged as i normally use enum for my dialogs but because this one has only one and i normally use enum for multiple dialogs as its easier to read. and i didnt think that the define would effect the DIALOG_COMMANDZ, you made a good point and made it clear to read and understand where i was going wrong. from now on i will not be making that mistake. once again thanks all for your help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)