Run time error 10

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
popilas
Gana aktyvus vartotojas
Posts: 401
Joined: 2017 Apr 04 11:44
Location: Alytus

Run time error 10

Post by popilas »

Code: Select all

public plugin_init() {    register_plugin(PLUGIN, VERSION, AUTHOR)    register_clcmd("say /sklep", "Sklep");   register_clcmd("say_team /sklep", "Sklep");     register_clcmd("say /shop", "Sklep");   register_clcmd("say_team /shop", "Sklep");}  public Sklep(id){    new tytul[25];    format(tytul, 24, "\rShop \yPaintball \rVIP");    new menu = menu_create(tytul, "Sklep_Handler");    menu_additem(menu, "Explosive Grenade \yCost: \r4000$");//1    menu_additem(menu, "Flashbang grenades \yCost: \r1000$");//2    menu_additem(menu, "Smoke grenade \yCost: \r2000$");//3    menu_additem(menu, "Super Marker \yCost: \r6000$");//4    menu_display(id, menu);    }public Sklep_Handler(id, menu, item){        if(!is_user_alive(id) || !is_user_connected(id))        return PLUGIN_CONTINUE;        new kasa = cs_get_user_money(id);        if(item == MENU_EXIT)    {        menu_destroy(menu);        return PLUGIN_CONTINUE;    }        switch(item)    {        case 0:        {            if(kasa >= 4000)                {                    cs_set_user_money(id, kasa-4000);                    give_item(id, "weapon_hegrenade")                     client_print(id, print_chat, "[Shop] Bought Explosive Grenade!");                }                                        else                client_print(id, print_chat, "[Shop] You do not have enough money!");        }        case 1:        {            if(kasa >= 1000)                {                    cs_set_user_money(id, kasa-1000);                    give_item(id, "weapon_flashbang")                     give_item(id, "weapon_flashbang")                     client_print(id, print_chat, "[Shop] You bought 2 flashbang!");                }                                        else                client_print(id, print_chat, "[Shop] You do not have enough money!!");        }        case 2:        {            if(kasa >= 2000)                {                    cs_set_user_money(id, kasa-2000);                    give_item(id, "weapon_smokegrenade")                     client_print(id, print_chat, "[Shop] You bought Smoke Grenade!");                }                                        else                client_print(id, print_chat, "[Shop] You do not have enough money!");        }                case 3:        {            if(kasa >= 6000)                {                    cs_set_user_money(id, kasa-6000);                    give_item(id, "weapon_p90")                     give_item(id, "weapon_primammo");                                              give_item(id, "weapon_primammo");                    client_print(id, print_chat, "[Shop] You bought a Super Marker!");                }                                        else                client_print(id, print_chat, "[Shop] You do not have enough money!");        }            }        return PLUGIN_CONTINUE;}  /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }*/ 
Nusipirkus Super Marker putty rodo

Code: Select all

L 01/10/2018 - 18:46:57: [FUN] Item "weapon_primammo" failed to createL 01/10/2018 - 18:46:57: [AMXX] Run time error 10 (plugin "paintballshop.amxx") (native "give_item") - debug not enabled!L 01/10/2018 - 18:46:57: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). 
Ir kodel p90 duoda tik 50 kulku? 50/0
Last edited by popilas on 2018 Jan 10 19:41, edited 1 time in total.
PATYLĖK!!! Bent protingesnis atrodysi :)


User avatar
popilas
Gana aktyvus vartotojas
Posts: 401
Joined: 2017 Apr 04 11:44
Location: Alytus

Re: Run time error 10

Post by popilas »

psychical wrote:give_item(id, "weapon_primammo"); - WTF is this?

https://forums.alliedmods.net/showthread.php?t=35512
aciu :D :je:
PATYLĖK!!! Bent protingesnis atrodysi :)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests