Raised This Month: $ Target: $400
 0% 

Solved Help with (Invalid cellvector handle provided (1:1:1))


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xDrugz
Senior Member
Join Date: Jul 2011
Location: return 4;
Old 11-12-2023 , 14:05   Help with (Invalid cellvector handle provided (1:1:1))
Reply With Quote #1

PROBLEM SOLVED! Thanks all.
__________________

Last edited by xDrugz; 11-14-2023 at 09:59.
xDrugz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-12-2023 , 20:34   Re: Help with (Invalid cellvector handle provided (1:1:1))
Reply With Quote #2

The error that you've shown means what it says, g_aBannedList is not a valid handle for a dynamic array. To be able to help you further, you'd need to post your whole plugin (attach the .sma file).

Also, as we mentioned in another thread, using a task or thinking entity is unnecessary and wasteful (extra processor usage). You can all of this on client_authorized() and you won't need to loop through potentially thousands of items in an array at all.
__________________
fysiks is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 11-13-2023 , 02:50   Re: Help with (Invalid cellvector handle provided (1:1:1))
Reply With Quote #3

It is not recommended to delete array elements during forward traversal.
If element 1 is deleted, element 2 will automatically become element 1. Array size will decrease by 1.
At this point, Removing element 2 may result in index out of bounds.
Leech_v2 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-14-2023 , 07:42   Re: Help with (Invalid cellvector handle provided (1:1:1))
Reply With Quote #4

Quote:
Originally Posted by Leech_v2 View Post
It is not recommended to delete array elements during forward traversal.
If element 1 is deleted, element 2 will automatically become element 1. Array size will decrease by 1.
At this point, Removing element 2 may result in index out of bounds.
That is a true solid issue, to solve it you need to decrement the arrSize by one and decrement one loop iteration...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-14-2023 at 07:44.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 06:52.


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