Raised This Month: $ Target: $400
 0% 

Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
@.SizNeR
Member
Join Date: Jun 2013
Old 09-21-2013 , 18:38   Help
Reply With Quote #1

Code:
enum _:g_iMain {     m_TerroristShop,     m_CounterTerroristShop }; new const g_szShopsData[ g_iMain ][][ 2 ] = {     {         { "Health Menu", "CmdHealthMenu_Handler" }, // Line 41         { "Weapons Menu", "CmdWeaponsMenu_Handler" }     },         {         { "Health Menu", "CmdHealthMenu_Handler" }, // Line 46         { "Weapons Menu", "CmdWeaponsMenu_Handler" },         { "Armor Menu", "CmdArmorMenu_Handler" },         { "Revive \r| \w80 Points", "CmdReviveShop" }     } };

Error:
Code:
Error: Initialization data exceeds declared size on line 41
Error: Initialization data exceeds declared size on line 46
@.SizNeR is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 09-21-2013 , 20:15   Re: Help
Reply With Quote #2

Firstly use a descriptive thread title.
Your issue is because you've declared your 3rd array dimension with a maximum of 2 cells / characters.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
@.SizNeR
Member
Join Date: Jun 2013
Old 09-21-2013 , 20:33   Re: Help
Reply With Quote #3

Quote:
Originally Posted by hornet View Post
Firstly use a descriptive thread title.
Your issue is because you've declared your 3rd array dimension with a maximum of 2 cells / characters.
So can you try fix it to me please?

I changed it to:

Code:
new const g_szShopsData[ g_iMain ][][] = {     {         { "Health Menu", "CmdHealthMenu_Handler" },         { "Weapons Menu", "CmdWeaponsMenu_Handler" }     },         {         { "Health Menu", "CmdHealthMenu_Handler" },         { "Weapons Menu", "CmdWeaponsMenu_Handler" },         { "Armor Menu", "CmdArmorMenu_Handler" },         { "Revive \r| \w80 Points", "CmdReviveShop" }     } };

And now the amxxpc.exe is crushing...

Thanks for help.
@.SizNeR is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-21-2013 , 21:55   Re: Help
Reply With Quote #4

I think you're exceeding the maximum ammount of array dimensions (3).
Just make 2 arrays, one for CT and one for T.
Or combine the array and add a third option that defines which team it is for.
__________________

Last edited by Black Rose; 09-21-2013 at 21:55.
Black Rose is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 09-22-2013 , 04:29   Re: Help
Reply With Quote #5

Black Rose is right. Didn't pick up on that.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet 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 00:10.


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