Raised This Month: $ Target: $400
 0% 

Error: Initialization data exceeds declared size on line 35


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chico Gangrena
BANNED
Join Date: Jul 2009
Old 07-21-2009 , 00:46   Error: Initialization data exceeds declared size on line 35
Reply With Quote #1

Hello , i get this when i compile my plugin:

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Initialization data exceeds declared size on line 31
Error: Initialization data exceeds declared size on line 35

2 Errors.
Could not locate output file C:\Archivos de programa\Valve\cstrike\addons\amxmodx\scripting\zombie_plague40.amx (compile failed).

This is what i add

Code:
#define MAXLEVELS 126 #define MAXCLASSES 30 new const MODELS[MAXCLASSES] = { "cabo", "cap_general", "capitan", "coronel", "general", "h4x0r", "maestro", "mayor", "recluta", "sargento", "soldado", "subofi", "subofim", "subteniente", "teniente", "TenienteCoronel", "TenienteGeneral", "Terminator" } new const CLASSES[MAXCLASSES] = { "Recluta", "Soldado", "Cabo", "Sargento", "Sub Oficial", "Sub Oficial Mayor", "Sub Teniente", "Teniente", "Capitan", "Mayor", "Teniente Coronel", "Coronel" , "General", "Teniente General", "Capitan General", "H4X0R", "Terminator", "Maestro" };


Please help me
Chico Gangrena is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-21-2009 , 00:49   Re: Error: Initialization data exceeds declared size on line 35
Reply With Quote #2



PHP Code:
MODELS[MAXCLASSES][]
CLASSES[MAXCLASSES][] 
__________________
fysiks is online now
Chico Gangrena
BANNED
Join Date: Jul 2009
Old 07-21-2009 , 00:49   Re: Error: Initialization data exceeds declared size on line 35
Reply With Quote #3

thank you


edit:

now i get

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Multi-dimensional arrays must be fully initialized on line 31
Error: Multi-dimensional arrays must be fully initialized on line 35

2 Errors.
Could not locate output file C:\Archivos de programa\Valve\cstrike\addons\amxmodx\scripting\zombie_plague40.amx (compile failed).
Chico Gangrena is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-21-2009 , 00:56   Re: Error: Initialization data exceeds declared size on line 35
Reply With Quote #4

That's because you aren't using all of the classes and models.

Do this instead:
Code:
new const CLASSES[][] = {     "Class 1",     "Class 2",     // ... }; #define MAXCLASSES sizeof(CLASSES) new const MODELS[MAXCLASSES][] = {     "model1",     "model2",     // ... };
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 07-21-2009, 01:01
Chico Gangrena
This message has been deleted by Brad. Reason: inappropriate immaturity
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 17:29.


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