tagmismatch

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
KamiN
Gana aktyvus vartotojas
Posts: 227
Joined: 2011 Apr 23 13:17

tagmismatch

Post by KamiN »

kodėl 43 eilutėj rodo warningą "tagmismatch"?

Code: Select all

else if(!pFlags & AWP_VIPFLAG)

Code: Select all

#include <amxmodx> #define VERSION "1.1.2"#define AWP_VIPFLAG ADMIN_LEVEL_H new const PREFIX[] = "!g| VIP |!n" new g_msgSayText public plugin_init() {     register_plugin("VIP AWP", VERSION, "As")     register_event("CurWeapon", "EventCurWeapon", "be", "1=1")     g_msgSayText = get_user_msgid("SayText")    }  public EventCurWeapon(id){    new weapon = read_data(2)     new mapname[32]    get_mapname(mapname, 31)     new pFlags = get_user_flags(id)     if(weapon == CSW_AWP)    {                if(equali(mapname, "awp_"))        {            return PLUGIN_HANDLED        }         else if(equali(mapname, "de_dust2_2x2") || equali(mapname, "de_dust2_3x3"))        {            client_cmd(id, "drop")            print_chatc(id, "%s Siame zemelapyje !tAWP!n naudoti yra draudziama!", PREFIX)        }         else if(!pFlags & AWP_VIPFLAG)        {            client_cmd(id, "drop")            print_chatc(id, "%s Tik !tVIP!n zaidejai gali naudoti !tAWP!n!", PREFIX)        }     }    return PLUGIN_HANDLED} stock print_chatc(const id, const input[], any:...){    new count = 1, players[32]    static msg[191]    vformat(msg, 190, input, 3)        replace_all(msg, 190, "!g", "^4") // Green Color    replace_all(msg, 190, "!n", "^1") // Default Color    replace_all(msg, 190, "!t", "^3") // Team Color        if (id) players[0] = id    else get_players(players, count, "ch")    for (new i = 0; i < count; i++)    {        if (is_user_connected(players[i]))        {            message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, players[i])            write_byte(players[i])            write_string(msg)            message_end()           }    }}
Last edited by KamiN on 2012 Jan 14 15:05, edited 4 times in total.

newb
Pluginų patvirtintojas
Posts: 1047
Joined: 2010 Sep 23 21:43
Location: Wonderland
Contact:

Re: tagmismatch

Post by newb »

Code: Select all

else if(!(pFlags & AWP_VIPFLAG))
CurWeapon evente tikrint koks mapas yra ziauru ^_^

KamiN
Gana aktyvus vartotojas
Posts: 227
Joined: 2011 Apr 23 13:17

Re: tagmismatch

Post by KamiN »

Aciū.

Mapą padariau, kad tikrintų plugin_init, geriau taip bus? :D
Last edited by KamiN on 2012 Jan 14 16:50, edited 2 times in total.

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: tagmismatch

Post by aaarnas »

KamiN wrote:Aciū.

Mapą padariau, kad tikrintų plugin_init, geriau taip bus? :D
Be abejo. Pirmas žingsnis link optimizacijos.
Palikau CS pasaulį ;/ . Nebepasiekiamas.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests