Raised This Month: $ Target: $400
 0% 

Error: Multi-dimensional arrays must be fully initialized


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Beqiri
New Member
Join Date: Sep 2023
Old 09-11-2023 , 23:41   Error: Multi-dimensional arrays must be fully initialized
Reply With Quote #1

hello, i have a error in this sma can someone help.
Error: Multi-dimensional arrays must be fully initialized on line 183
Attached Files
File Type: sma Get Plugin or Get Source (bb_BaseBulder_9.0.sma - 41 views - 82.9 KB)

Last edited by Beqiri; 09-11-2023 at 23:42.
Beqiri is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 09-12-2023 , 00:31   Re: Error: Multi-dimensional arrays must be fully initialized
Reply With Quote #2

then fullly initialize them
lexzor is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-13-2023 , 20:27   Re: Error: Multi-dimensional arrays must be fully initialized
Reply With Quote #3

PHP Code:
static const szWeaponNames[23][24] = { "{XM1014 M4}""{AUG}""{SG-550 Auto-Sniper}",
            
"{Famas}""{AWP Magnum Sniper}""{MP5 Navy}""{M4A1}",
            
"{AK-47 Kalashnikov}",
            
"{USP .45 ACP Tactical}""{Desert Eagle .50 AE}" 
You are saying "hey compiler, please allocate memory for 23 instances of these 24 character length things" but then you only provide 10 strings.

Change
static const szWeaponNames[23][24]
to
static const szWeaponNames[][]
or
static const szWeaponNames[10][]
__________________
Bugsy 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 06:23.


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