AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Tag mismatch (https://forums.alliedmods.net/showthread.php?t=279876)

ironskillz1 03-03-2016 11:35

Tag mismatch
 
Getting tag mismatch on this line and i dont really know whats wrong?
Code:

formatex(szMenuItem, charsmax(szMenuItem), "\w%s%s", MENU_PISTOLS[i][NAME], playerUsingDeagle[id] == i ? " \y[Enabled]" : "")
Here some code that the menu is using.

Code:

new playerUsingDeagle[33]

enum _:ITEMS_DATAS {
        WEAPON[50],
        VMODEL[50],
        PMODEL[50],
        NAME[50]
}

new const MENU_PISTOLS[][ITEMS_DATAS] =
{
        {"RESET", "RESET", "RESET", "RESET"},
        {CSW_DEAGLE, "models/deagleconspiracy/v_deagle_conspiracy.mdl", "models/deagleconspiracy/p_deagle_conspiracy.mdl", "Conspiracy Deagle"},
        {CSW_DEAGLE, "models/kingsdeagle/v_kingsdeagle.mdl", "models/kingsdeagle/p_kingsdeagle.mdl", "Kings Deagle"},
        {CSW_DEAGLE, "models/revolver/v_revolver.mdl", "models/revolver/p_revolver.mdl", "Revolver Deagle"},
        {CSW_DEAGLE, "models/flamesdeagle/v_flamesdeagle.mdl", "models/flamesdeagle/p_flamesdeagle.mdl", "Flames Deagle"}
}

Thanks in advance.

xxxperts 03-03-2016 12:02

Re: Tag mismatch
 
Your given code is perfectly correct you must show more code.

Bugsy 03-03-2016 12:05

Re: Tag mismatch
 
Your formatex line looks ok from what I can see.

ITEM_DATAS is defined as being all strings.

In your first line you have 4 strings which is ok, then you have 4 lines starting with CSW_DEAGLE, which is an integer. It is expecting a string value. You can't just put data however you want, it has to comply with how your enum/array is defined. If WEAPON is supposed to be a weapon index, remove the [50]

Kakarot47 03-03-2016 12:11

Re: Tag mismatch
 
You are genus Bugsy i proud on you
but my topic is not solving can you plz take a look at that situation
NPC Situation


All times are GMT -4. The time now is 18:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.