Hi all.. I from Poland and first im sorry for my bad english.
I have my mod.. ExpMod by STRIKER.. and i total rebuild engine of my expmod.
Now im rebuild shop, and i have this error:
PHP Code:
L 08/24/2012 - 18:03:31: Wrong style of dynamic native
L 08/24/2012 - 18:03:31: [AMXX] Displaying debug trace (plugin "expmod_shop.amxx")
L 08/24/2012 - 18:03:31: [AMXX] Run time error 10: native error (native "param_convert")
L 08/24/2012 - 18:03:31: [AMXX] [0] expmod_shop.sma::shop_register_item (line 125)
L 08/24/2012 - 18:03:31: Unhandled dynamic native error
L 08/24/2012 - 18:03:31: [AMXX] Displaying debug trace (plugin "expmod_shop_amunicja.amxx")
L 08/24/2012 - 18:03:31: [AMXX] Run time error 10: native error (native "exp_shop_register_item")
L 08/24/2012 - 18:03:31: [AMXX] [0] expmod_shop_amunicja.sma::plugin_init (line 24)
amunicja = ammo
(expmod_shop_ammo.sma)
Function : register_item :
PHP Code:
public shop_register_item(const name[], const description[], price, one_round)
{
liczba_itemow++
if(liczba_itemow > MAX_ITEMY+1)
return PLUGIN_CONTINUE
param_convert(1)
param_convert(2)
copy(NazwyItemow[liczba_itemow], 63, name)
copy(OpisyItemow[liczba_itemow], 127, description)
KosztyItemow[liczba_itemow] = price
RazNaRunde[liczba_itemow] = one_round
return liczba_itemow;
}
liczba_itemow = item_num
NazwyItemow = ItemsName
OpisyItemow = ItemsDesc
KosztyItemow = ItemsPrice
RazNaRunde = one_round
this is .inc
PHP Code:
#if defined _expmodshop_included
#endinput
#endif
#define _expmodshop_included
native exp_shop_register_item(const name[], const description[], price, one_rund)
forward item_selected(id, itemid)
And this is code where im using exp_shop_register_item :
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <expmod_shop>
#include <cstrike>
#define PLUGIN "ExpMod Shop Ammo"
#define VERSION "1.0"
#define AUTHOR "tomcionek15 & grs4"
new const maxAmmo[31] = {0,52,0,90,1,32,1,100,90,1,120,100,100,90,90,90,100,120,30,120,200,32,90,120,90,2,35,90,90,0,100};
new const nazwa[] = "Ammo"
new const opis[] = "You got ammo for all your weapons"
new cena = 0;
new one_round = 0;
new item;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
item = exp_shop_register_item(nazwa, opis, cena, one_round) // name, desc, price
}
public item_selected(id, itemid)
{
if(item == itemid)
{
new weapons[32];
new weaponsnum;
get_user_weapons(id, weapons, weaponsnum);
for(new i=0; i<weaponsnum; i++)
if(is_user_alive(id) && is_user_connected(id) && !is_user_hltv(id))
if(maxAmmo[weapons[i]] > 0)
cs_set_user_bpammo(id, weapons[i], maxAmmo[weapons[i]]);
}
}
Help me pls..
P.S : Sorry for my errors in topic.
This is my first topic ( im think )