Raised This Month: $12 Target: $400
 3% 

Invalid index 0 (count: 0)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 05-02-2017 , 12:22   Invalid index 0 (count: 0)
Reply With Quote #1

Why error occurs "Invalid index 0 (count: 0)" in this code?

Quote:
Invalid index 0 (count: 0)
[AMXX] Displaying debug trace (plugin "mapmanager.amxx", version "1.8.3-dev+5110")
[AMXX] Run time error 10: native error (native "ArrayGetCell")
[AMXX] [0] Untitled.sma::Command_Say (line 255)
Spoiler

Last edited by OnePL; 05-02-2017 at 12:25.
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-02-2017 , 13:55   Re: Invalid index 0 (count: 0)
Reply With Quote #2

Are you sure '0' is the correct item ?

You could use more debug printing message too see what's your problem.
I'm not so good at array because i never played with them but can you try change ArrayGetCell from 0 to 1 ? , like that:
PHP Code:
iMapID ArrayGetCell(aNominateList1); 
maybe it will work.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 05-02-2017 , 13:56   Re: Invalid index 0 (count: 0)
Reply With Quote #3

iArraySize is not zeroed before using, you should use new for most of variables instead of static.
__________________

Last edited by PRoSToTeM@; 05-02-2017 at 13:57.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 05-03-2017 , 09:35   Re: Invalid index 0 (count: 0)
Reply With Quote #4

@ PRoSToTeM@ thanks,
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
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 11:27.


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