SA-MP Forums Archive
[HELP] Tag Mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Tag Mismatch (/showthread.php?tid=545152)



[HELP] Tag Mismatch - Jakwob - 06.11.2014

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.


Re: [HELP] Tag Mismatch - Stinged - 06.11.2014

Change the define name to something else like COMMANDS.


Re: [HELP] Tag Mismatch - DavidBilla - 06.11.2014

Define the dialogid instead of enclosing it in an enum


Re: [HELP] Tag Mismatch - M0HAMMAD - 06.11.2014

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



Re: [HELP] Tag Mismatch - Jakwob - 06.11.2014

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


Re: [HELP] Tag Mismatch - Jakwob - 06.11.2014

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.


Re: [HELP] Tag Mismatch - DavidBilla - 06.11.2014

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


Re: [HELP] Tag Mismatch - Mitchelll - 06.11.2014

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;
}



Re: [HELP] Tag Mismatch - Stinged - 06.11.2014

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"


Re: [HELP] Tag Mismatch - Jakwob - 06.11.2014

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.