Raised This Month: $ Target: $400
 0% 

Wrong style of dynamic native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 08-24-2012 , 12:14   Wrong style of dynamic native
Reply With Quote #1

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:31Wrong style of dynamic native
L 08
/24/2012 18:03:31: [AMXXDisplaying debug trace (plugin "expmod_shop.amxx")
L 08/24/2012 18:03:31: [AMXXRun time error 10native error (native "param_convert")
L 08/24/2012 18:03:31: [AMXX]    [0expmod_shop.sma::shop_register_item (line 125)
L 08/24/2012 18:03:31Unhandled dynamic native error
L 08
/24/2012 18:03:31: [AMXXDisplaying debug trace (plugin "expmod_shop_amunicja.amxx")
L 08/24/2012 18:03:31: [AMXXRun time error 10native error (native "exp_shop_register_item")
L 08/24/2012 18:03:31: [AMXX]    [0expmod_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[], priceone_round)
{
    
liczba_itemow++
    if(
liczba_itemow MAX_ITEMY+1)
        return 
PLUGIN_CONTINUE
    param_convert
(1)
    
param_convert(2)
    
    
copy(NazwyItemow[liczba_itemow], 63name)
    
copy(OpisyItemow[liczba_itemow], 127description)

    
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[], priceone_rund)

forward item_selected(iditemid
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(PLUGINVERSIONAUTHOR)
    
    
item exp_shop_register_item(nazwaopiscenaone_round// name, desc, price
}
public 
item_selected(iditemid)
{
    if(
item == itemid)
    {
        new 
weapons[32];
        new 
weaponsnum;
        
get_user_weapons(idweaponsweaponsnum);
                
        for(new 
i=0i<weaponsnumi++)
            if(
is_user_alive(id) && is_user_connected(id) && !is_user_hltv(id))
                if(
maxAmmo[weapons[i]] > 0)
                    
cs_set_user_bpammo(idweapons[i], maxAmmo[weapons[i]]);
    }

Help me pls..

P.S : Sorry for my errors in topic.
This is my first topic ( im think )

Last edited by grs4; 08-24-2012 at 12:15.
grs4 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode