Raised This Month: $ Target: $400
 0% 

Invalid cellvector handle provided (6:89:46)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owner123
Member
Join Date: Jun 2010
Old 06-08-2010 , 10:13   Invalid cellvector handle provided (6:89:46)
Reply With Quote #1

Hi everyone. I'm new user on this forum but i observing this forum a long time
So, back to topic. I want to add more items to DiabloMod with other plugins.
I use this tutorial but i get errors
Code:
L 06/08/2010 - 16:08:01: Invalid cellvector handle provided (6:89:46)
L 06/08/2010 - 16:08:01: [AMXX] Displaying debug trace (plugin "dbmod_5.9lv3_forwards.amxx")
L 06/08/2010 - 16:08:01: [AMXX] Run time error 10: native error (native "ArrayGetArray")
L 06/08/2010 - 16:08:01: [AMXX]    [0] temp32.sma::award_item (line 4
I use this to get data:
PHP Code:
default:
        {
            
ExecuteForward(gFwItemgFwResultidrannum)
            if(
gFwResult == DIABLO_SUPERCEDE)
            {
                
player_item_name[id] = "None"
                
player_item_id[id] = 0
                reset_item_skills
(id)
            }
            else
            {
                new 
buffer[ItemData]
                
ArrayGetArray(ItemArrayrannumbuffer)
                
copy(player_item_name[id], 127buffer[ItemName])
                
format(buffer512"You Found item : %s :: %s"player_item_name[id], buffer[ItemShort])
                
show_hudmessage(idbuffer)
            }
            
        } 
If native function will need to solve my problem, i post with this.

Last edited by Owner123; 06-08-2010 at 10:22.
Owner123 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 11:41   Re: Invalid cellvector handle provided (6:89:46)
Reply With Quote #2

You don't post enough code. Check if ItemArray is not destroyed or if it 's well filled.
__________________
Arkshine is offline
Owner123
Member
Join Date: Jun 2010
Old 06-08-2010 , 12:22   Re: Invalid cellvector handle provided (6:89:46)
Reply With Quote #3

PHP Code:
enum _:ItemData
{
    
ItemName[128],
    
ItemShort[101],
    
ItemDesc[512]
}
new Array:
ItemArray

plugin_init
() {
    [...]
    
ItemArray ArrayCreate(ItemData)
    [...]

This is my array handle. :s Tell what you need and I post this :s (if u know what need ...)
Because i have 88 items i not want make all item registration again so i make that:
PHP Code:
for(gCountItems 0gCountItems <= 88gCountItems++)
        
_diablo_register_item(" "" "" "
This is maybe a reason, that element 0 is empty ? ( is use register_native("diablo_register_item", "_diablo_register_item", 1) )

Last edited by Owner123; 06-08-2010 at 12:48.
Owner123 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 13:07   Re: Invalid cellvector handle provided (6:89:46)
Reply With Quote #4

After looking to the Amxx source code, your error is because rannum is out of bound. it seems that the current dynamic array size is 46 when you ask the item index 89.
__________________
Arkshine is offline
Owner123
Member
Join Date: Jun 2010
Old 06-08-2010 , 13:53   Re: Invalid cellvector handle provided (6:89:46)
Reply With Quote #5

When i ask the item index 88 it dont return me any errors. Ofc. i make plugin which register new item with item index 89.
Owner123 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 14:21   Re: Invalid cellvector handle provided (6:89:46)
Reply With Quote #6

What does return ArraySize ? Anyway your error is an outbound error. Since you don't show all the code related at least to this array, check more yourself. ^^
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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:16.


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