Raised This Month: $ Target: $400
 0% 

Array must be indexed (Array inside Array?)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-22-2015 , 17:57   Array must be indexed (Array inside Array?)
Reply With Quote #1

Edit: Solved

Error:
Code:
 error 033: array must be indexed (variable "gLEVELS")
PHP Code:
new const gLEVELS[10]/*[]*/ = {
    
0
    
10
    
20
    
30
    
40
    
50
    
60
    
70
    
80
    
90

PHP Code:
while(gPL_XP[attacker] >= /*>>*/gLEVELS[gPL_LVL[attacker]]/*<<*/
It's already indexed with an indexed array?!

Last edited by redivcram; 12-22-2015 at 18:52.
redivcram is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-22-2015 , 18:07   Re: Array must be indexed (Array inside Array?)
Reply With Quote #2

You are saying it's a 2-dimension ([][]) array but defining it as 1-dimension ([]).

Do
new const gLEVELS[10]
or
new const gLEVELS[]
__________________
Bugsy is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-22-2015 , 18:51   Re: Array must be indexed (Array inside Array?)
Reply With Quote #3

Thx

I'll report to that thread about arrays you made I think.
redivcram is offline
Reply



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 18:12.


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