warning 213: tag mismatch
#1

UNKNOWS
Value:
Код:
enum MATERIAL {
    MModel,
    Material1[24],
    Material2[24],
    MName[24],
    MPrice
};

new Material[][MATERIAL] = {
{3925, "weemap", "skyclouds", "蓝天白云", 15000},
{5134, "wasteland_las2", "ws_sandstone2", "石砖", 6000},
{17298, "weefarmcuntw", "sjmbigold2", "木头", 8000},
{16150, "ufo_bar", "dinerfloor01_128", "黑白", 24000},
{18265, "w_town3cs_t", "ws_redbrickold", "砖墙", 4000},
{12954, "sw_furniture", "CJ_WOOD5", "深色木板", 6900},
{8438, "vgseroads", "des_dirt1", "沙漠", 2000},
{8518, "vgsehighways", "hiwayend_256", "高速", 4500},
{8419, "vgsbldng1", "ap_tarmac", "裂开的地板", 3650},
{17009, "truth_farm", "des_ghotwood1", "老旧的木板", 3500},
{10931, "traingen_sfse", "metpat64", "钢铁", 5500},
{12986, "sw_well1", "Bio_64", "生化", 7250},
{8532, "tikigrass", "swimpoolbtm1_128", "白方格", 13000},
{13296, "sw_roadgas", "sw_corrugtile", "破铁片", 2200},
{13066, "sw_fact01a", "kickbarrier", "红与白", 30000},
{6095, "shops01_law", "GB_chatwall03b", "蓝墙", 50000},
{8399, "vgs_shops", "vgsclubwall05_128", "一尘不染", 14000},
{3975, "lanbloke", "p_floor3", "沥青", 8600},
{3310, "sw_poorhouse", "Grass_128HV", "草地", 12000},
{18631, "NoModelFile", "NoModelFile", "警告", 9000},
{18838, "MickyTextures", "ws_gayflag1", "彩虹", 35000},
{19058, "XmasBoxes", "wrappingpaper28", "星星", 41000},
{19443, "all_walls", "mp_shop_floor2", "浅色木板", 7950},
{19325, "lsmall_shops", "lsmall_window01", "浅灰透明", 36500}
};
When use:
Код:
            new pDialog[512];
            strcat(pDialog, "纹理\t价格\n", sizeof(pDialog));
            for(new i;i < MAX_M; i++)
            {
            new string[20];
            format(string,sizeof(string),"%s\t%d\n",Material[i][3],Material[i][4]);//warning 213: tag mismatch.
            strcat(pDialog, string, sizeof(pDialog));
            }
            ShowPlayerDialog(playerid,Dialog_Material2,DIALOG_STYLE_LIST,"浏览纹理",pDialog,"购买","取消");
May be have other way?
Reply
#2

hmm, wait for ****** because my answer is not appreciated.

Material[i][3] -> Material[i][Material2][3] ...


I think you should do, I think.
Reply
#3

You either use
MATERAL:3 and MATERIAL:4
or just write enum name.
- >
PHP код:
format(string,sizeof(string),"%s\t%d\n",Material[i][MName],Material[i][MPrice]);//warning 213: tag mismatch. 
Or ->

PHP код:
enum MATERIAL {
    
MModel// 0
    
Material1[24], // 1
    
Material2[24], // 25
    
MName[24], // 49
    
MPrice // 73
}; 
So
PHP код:
format(string,sizeof(string),"%s\t%d\n",Material[i][MATERIAL:49],Material[i][MATERIAL:73]); 
I don't recommend using that and the values I wrote maybe incorrect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)