Raised This Month: $ Target: $400
 0% 

2d array index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-01-2018 , 18:58   Re: 2d array index out of bounds
Reply With Quote #7

That was definitely the problem. The enumerator is really just a 'sizer' for an array so setting it to false does not make sense. The enum provides you offsets based on items preceding it, making it easy and fast to work with constants/variable-names to access items in an array. Setting to false for something would need to be done on the g_PlayerData[] array that was sized by playerTable.

The enum items in playerTable hold the below values. If the compiler allowed this, doing "isOnline = false" would change its value from 125 to 0 which essentially would over-write data where 'nick' is stored.

nick=0
steamID=32
password=77
language=122
isOnline=125
isVip=126
isAdmin=127
bcoins = 128
__________________

Last edited by Bugsy; 12-01-2018 at 19:01.
Bugsy is offline
 



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 07:35.


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