Tag Mismatch
#1

pawn Код:
if(GetPlayerWeapon(playerid) == 1 && DOF2_GetInt(pFile(playerid),"1")==0 && w1[playerid] == false
    || GetPlayerWeapon(playerid) == 2 && DOF2_GetInt(pFile(playerid),"2")==0 && w2[playerid] == false
    || GetPlayerWeapon(playerid) == 2 && DOF2_GetInt(pFile(playerid),"2")==0 && w2[playerid] == false
    || GetPlayerWeapon(playerid) == 3 && DOF2_GetInt(pFile(playerid),"3")==0 && w3[playerid] == false
    || GetPlayerWeapon(playerid) == 4 && DOF2_GetInt(pFile(playerid),"4")==0 && w4[playerid] == false
    || GetPlayerWeapon(playerid) == 5 && DOF2_GetInt(pFile(playerid),"5")==0 && w5[playerid] == false
    || GetPlayerWeapon(playerid) == 6 && DOF2_GetInt(pFile(playerid),"6")==0 && w6[playerid] == false
    || GetPlayerWeapon(playerid) == 7 && DOF2_GetInt(pFile(playerid),"7")==0 && w7[playerid] == false
    || GetPlayerWeapon(playerid) == 8 && DOF2_GetInt(pFile(playerid),"8")==0 && w8[playerid] == false
    || GetPlayerWeapon(playerid) == 9 && DOF2_GetInt(pFile(playerid),"9")==0 && w9[playerid] == false
    || GetPlayerWeapon(playerid) == 10 && DOF2_GetInt(pFile(playerid),"10")==0 && w10[playerid] == false
    || GetPlayerWeapon(playerid) == 11 && DOF2_GetInt(pFile(playerid),"11")==0 && w11[playerid] == false
    || GetPlayerWeapon(playerid) == 12 && DOF2_GetInt(pFile(playerid),"12")==0 && w12[playerid] == false
    || GetPlayerWeapon(playerid) == 13 && DOF2_GetInt(pFile(playerid),"13")==0 && w13[playerid] == false
    || GetPlayerWeapon(playerid) == 14 && DOF2_GetInt(pFile(playerid),"14")==0 && w14[playerid] == false
    || GetPlayerWeapon(playerid) == 15 && DOF2_GetInt(pFile(playerid),"15")==0 && w15[playerid] == false
    || GetPlayerWeapon(playerid) == 16 && DOF2_GetInt(pFile(playerid),"16")==0 && w16[playerid] == false
    || GetPlayerWeapon(playerid) == 17 && DOF2_GetInt(pFile(playerid),"17")==0 && w17[playerid] == false
    || GetPlayerWeapon(playerid) == 18 && DOF2_GetInt(pFile(playerid),"18")==0 && w18[playerid] == false
    || GetPlayerWeapon(playerid) == 22 && DOF2_GetInt(pFile(playerid),"22")==0 && w22[playerid] == false
    || GetPlayerWeapon(playerid) == 23 && DOF2_GetInt(pFile(playerid),"23")==0 && w23[playerid] == false
    || GetPlayerWeapon(playerid) == 24 && DOF2_GetInt(pFile(playerid),"24")==0 && w24[playerid] == false
    || GetPlayerWeapon(playerid) == 25 && DOF2_GetInt(pFile(playerid),"25")==0 && w25[playerid] == false
    || GetPlayerWeapon(playerid) == 26 && DOF2_GetInt(pFile(playerid),"26")==0 && w26[playerid] == false
    || GetPlayerWeapon(playerid) == 27 && DOF2_GetInt(pFile(playerid),"27")==0 && w27[playerid] == false
    || GetPlayerWeapon(playerid) == 28 && DOF2_GetInt(pFile(playerid),"28")==0 && w28[playerid] == false
    || GetPlayerWeapon(playerid) == 29 && DOF2_GetInt(pFile(playerid),"29")==0 && w29[playerid] == false
    || GetPlayerWeapon(playerid) == 30 && DOF2_GetInt(pFile(playerid),"30")==0 && w30[playerid] == false
    || GetPlayerWeapon(playerid) == 31 && DOF2_GetInt(pFile(playerid),"31")==0 && w31[playerid] == false
    || GetPlayerWeapon(playerid) == 32 && DOF2_GetInt(pFile(playerid),"32")==0 && w32[playerid] == false
    || GetPlayerWeapon(playerid) == 33 && DOF2_GetInt(pFile(playerid),"33")==0 && w33[playerid] == false
    || GetPlayerWeapon(playerid) == 34 && DOF2_GetInt(pFile(playerid),"34")==0 && w34[playerid] == false
    || GetPlayerWeapon(playerid) == 35 && DOF2_GetInt(pFile(playerid),"35")==0 && w35[playerid] == false
    || GetPlayerWeapon(playerid) == 36 && DOF2_GetInt(pFile(playerid),"36")==0 && w36[playerid] == false
    || GetPlayerWeapon(playerid) == 37 && DOF2_GetInt(pFile(playerid),"37")==0 && w37[playerid] == false
    || GetPlayerWeapon(playerid) == 38 && DOF2_GetInt(pFile(playerid),"38")==0 && w38[playerid] == false
    || GetPlayerWeapon(playerid) == 39 && DOF2_GetInt(pFile(playerid),"39")==0 && w39[playerid] == false
    || GetPlayerWeapon(playerid) == 40 && DOF2_GetInt(pFile(playerid),"40")==0 && w40[playerid] == false
    || GetPlayerWeapon(playerid) == 41 && DOF2_GetInt(pFile(playerid),"41")==0 && w41[playerid] == false
    || GetPlayerWeapon(playerid) == 42 && DOF2_GetInt(pFile(playerid),"42")==0 && w42[playerid] == false
    || GetPlayerWeapon(playerid) == 43 && DOF2_GetInt(pFile(playerid),"43")==0 && w43[playerid] == false
    || GetPlayerWeapon(playerid) == 44 && DOF2_GetInt(pFile(playerid),"44")==0 && w44[playerid] == false
    || GetPlayerWeapon(playerid) == 45 && DOF2_GetInt(pFile(playerid),"45")==0 && w45[playerid] == false
    || GetPlayerWeapon(playerid) == 46 && DOF2_GetInt(pFile(playerid),"46")==0 && w46[playerid] == false){
the tag mismatch appears only when i have more than "w(number)"
I have like 45 tag mismatches lol
Reply
#2

Woah dude, you should learn about arrays and loops. Anyway, could you show your declaraction of w%d arrays?
Reply
#3

Show us yout stock for that: DOF2_GetInt
Reply
#4

you dont have to write out every if statment to get the same result you could do something like

pawn Код:
new w[MAX_PLAYERS][47];   //ARRAY 47 SLOTS FOR EACH PLAYERS (put where your w%d var's are)

new weapon = GetPlayerWeapon(playerid);  // GET WEAPON
new weapstr[2]; //STRING
valstr(weapstr, weapon); //COPY THE VAL TO A STRING

if(DOF2_GetInt(pFile(playerid),weapstr) == 0  && w[playerid][weapon] == 0){ // AND CHECK ANY/ALL OF THEM
    //do stuff
}
just saying
Reply


Forum Jump:


Users browsing this thread: