Problem whit Plugin Api
Hay i got a Problem i want to add Items from the Main Plugin as Defaults but i always get a runtime error
i used this Code http://forums.alliedmods.net/showthread.php?t=123445 and the error looks like this The Inc i have included the code is a 1 to 1 Copy just whit other func names Error: L 01/17/2011 - 15:34:55: Invalid array handle provided (0) L 01/17/2011 - 15:34:55: [AMXX] Displaying debug trace (plugin "plugin.amxx") L 01/17/2011 - 15:34:55: [AMXX] Run time error 10: native error (native "ArrayPushArray") L 01/17/2011 - 15:34:55: [AMXX] [0] plugin.sma::_shop_item_add (line 2023) Please help me ;) |
Re: Problem whit Plugin Api
Invalid array handle provided (0) , means the handle provided has not been created. Show your actual code.
|
Re: Problem whit Plugin Api
hmm but when i add the Item via en Sub-Plugin everythink is working Well
Head PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: Problem whit Plugin Api
I would make a local function that does the same thing and use that instead of using the native (if, infact, you can't use the native within the plugin which created it).
|
Re: Problem whit Plugin Api
yes i tought about the same think but i dont know how because i dont know how callfunc works and i dont know how to change the Code
PHP Code:
|
Re: Problem whit Plugin Api
Code:
If you want to use this native in the main plugin, then just make a function for it to save native calls. Code:
In AddItem(), you can use -1 for iPlugin if the function is called from the main plugin. |
Re: Problem whit Plugin Api
First Thanks for this nice example.
i got one more Problem the Price of the Item always Returns -1 My Code : Plugin Init PHP Code:
PHP Code:
|
Re: Problem whit Plugin Api
Show your full code.
|
Re: Problem whit Plugin Api
Soo
If i Call it whit This Function via a Sub Plugin it works PHP Code:
PHP Code:
PHP Code:
|
Re: Problem whit Plugin Api
Quote:
|
| All times are GMT -4. The time now is 02:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.