AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Invalid cellvector handle provided (6:89:46) (https://forums.alliedmods.net/showthread.php?t=129054)

Owner123 06-08-2010 10:13

Invalid cellvector handle provided (6:89:46)
 
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.

Arkshine 06-08-2010 11:41

Re: Invalid cellvector handle provided (6:89:46)
 
You don't post enough code. Check if ItemArray is not destroyed or if it 's well filled.

Owner123 06-08-2010 12:22

Re: Invalid cellvector handle provided (6:89:46)
 
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) )

Arkshine 06-08-2010 13:07

Re: Invalid cellvector handle provided (6:89:46)
 
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.

Owner123 06-08-2010 13:53

Re: Invalid cellvector handle provided (6:89:46)
 
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.

Arkshine 06-08-2010 14:21

Re: Invalid cellvector handle provided (6:89:46)
 
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. ^^


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

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