Raised This Month: $ Target: $400
 0% 

Compiler problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aluta
Junior Member
Join Date: Jul 2010
Old 07-27-2010 , 15:46   Compiler problem
Reply With Quote #1

Hi guys

I want to delete one of the blocks from the plugin but i get every time a error. Plz Help

Original Plugin

Code:
new const gszBlockNames[gBlockMax][32] =
{
    "Platform",
    "Bunnyhop",
    "Damage",
    "Healer",
    "No Fall Damage",
    "Ice",
    "Trampoline",
    "Speed Boost",
    "Invincibility",
    "Stealth",
    "Death",
    "Nuke",
    "Camouflage",
    "Low Gravity",
    "Fire",
    "Slap",
    "Random",
    "Honey",
    "CT Barrier",
    "T Barrier",
    "Boots Of Speed",
    "Glass",
    "Bunnyhop (No slow down)",
    "Auto Bunnyhop"
};
Error Plugin (without "Invincibility")

I deleted all of the "Invincibility" things out of the plugin
Code:
new const gszBlockNames[gBlockMax][32] =
{
    "Platform",
    "Bunnyhop",
    "Damage",
    "Healer",
    "No Fall Damage",
    "Ice",
    "Trampoline",
    "Speed Boost",
    "Stealth",
    "Death",
    "Nuke",
    "Camouflage",
    "Low Gravity",
    "Fire",
    "Slap",
    "Random",
    "Honey",
    "CT Barrier",
    "T Barrier",
    "Boots Of Speed",
    "Glass",
    "Bunnyhop (No slow down)",
    "Auto Bunnyhop"
};
If i try "new const gszBlockNames[gBlockMax][32] =" i get "error 052: multi-dimensional arrays must be fully initialized"

& if i try "new const gszBlockNames[gBlockMax][31 or 23] =" then i get "error 018 initialization data exceeds declared size"

Whats wrong?
I have no idea more.
Plz Help

Sry, for the bad english.
Attached Files
File Type: sma Get Plugin or Get Source (blockmaker_v4.01.sma - 104 views - 162.9 KB)
File Type: sma Get Plugin or Get Source (blockmaker_v4.01 without Invi.sma - 86 views - 159.8 KB)

Last edited by Aluta; 07-28-2010 at 10:21.
Aluta is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-27-2010 , 16:00   Re: Compiler problem
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=107153
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 07-28-2010 , 21:03   Re: Compiler problem
Reply With Quote #3

Quote:
Originally Posted by GXLZPGX View Post
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
DaxProxy
Senior Member
Join Date: Sep 2007
Old 07-28-2010 , 08:04   Re: Compiler problem
Reply With Quote #4

Quote:
Originally Posted by Aluta View Post
Hi guys

I want to delete one of the blocks from the plugin but i get every time a error. Plz Help

Original Plugin

PHP Code:
new const gszBlockNames[gBlockMax][32] =
{
    
"Platform",
    
"Bunnyhop",
    
"Damage",
    
"Healer",
    
"No Fall Damage",
    
"Ice",
    
"Trampoline",
    
"Speed Boost",
    
"Invincibility",
    
"Stealth",
    
"Death",
    
"Nuke",
    
"Camouflage",
    
"Low Gravity",
    
"Fire",
    
"Slap",
    
"Random",
    
"Honey",
    
"CT Barrier",
    
"T Barrier",
    
"Boots Of Speed",
    
"Glass",
    
"Bunnyhop (No slow down)",
    
"Auto Bunnyhop"
};[/code]Error Plugin (without "Invincibility")

I deleted all of the "Invincibility" things out of the plugin
[code]new const gszBlockNames[gBlockMax][32] =
{
    
"Platform",
    
"Bunnyhop",
    
"Damage",
    
"Healer",
    
"No Fall Damage",
    
"Ice",
    
"Trampoline",
    
"Speed Boost",
    
"Stealth",
    
"Death",
    
"Nuke",
    
"Camouflage",
    
"Low Gravity",
    
"Fire",
    
"Slap",
    
"Random",
    
"Honey",
    
"CT Barrier",
    
"T Barrier",
    
"Boots Of Speed",
    
"Glass",
    
"Bunnyhop (No slow down)",
    
"Auto Bunnyhop"
}; 
If i try "new const gszBlockNames[gBlockMax][32] =" i get "error 052: multi-dimensional arrays must be fully initialized"

& if i try "new const gszBlockNames[gBlockMax][32] =" then i get "error 018 initialization data exceeds declared size"

Whats wrong?
I have no idea more.
Plz Help

Sry, for the bad english.
Now when you start changing plugins, then it's very important that you first learn about PAWN's basics...i've been there, dont that and regretted that i even started changing something.

Anyways, new const gszBlockNames[gBlockMax][32]
As you can see, then gszBlockNames is two dimensional array, and the number 32 represents the ammount of data in the array. If you remove "Invincibility", then there will be only 31 items in array and that means that you get error, because compiler is told that there MUST be 32 items in array.

Mean that you need to change:
gszBlockNames[gBlockMax][32]
to
gszBlockNames[gBlockMax][31]

This thread will get trashed soon, but i hope that you get the point i was trying to explain.

Edit:
sh*t i think i totally failed, but you can try.
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy is offline
Aluta
Junior Member
Join Date: Jul 2010
Old 07-28-2010 , 10:58   Re: Compiler problem
Reply With Quote #5

i edited my post,
i tried it with gszBlockNames[gBlockMax][31] and gszBlockNames[gBlockMax][23] ;)
Need Help
Aluta is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-28-2010 , 11:50   Re: Compiler problem
Reply With Quote #6

Check the value of gBlockMax. DaxProxy is on the right track with his statement
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Aluta
Junior Member
Join Date: Jul 2010
Old 07-28-2010 , 17:37   Re: Compiler problem
Reply With Quote #7

What?
I did it or not?!
Aluta is offline
Aluta
Junior Member
Join Date: Jul 2010
Old 07-29-2010 , 05:52   Re: Compiler problem
Reply With Quote #8

Plz help me or shut your mouth -.-
Aluta is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-29-2010 , 09:44   Re: Compiler problem
Reply With Quote #9

Quote:
Originally Posted by Aluta View Post
Plz help me or shut your mouth -.-
This is Scripting Help, not Do It For Me. We are not here to give you the actual fix, only lead you in the right direction so you can fix it yourself
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-29-2010 , 09:50   Re: Compiler problem
Reply With Quote #10

Quote:
Originally Posted by YamiKaitou View Post
This is Scripting Help, not Do It For Me. We are not here to give you the actual fix, only lead you in the right direction so you can fix it yourself
Oops
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Reply


Thread Tools
Display Modes

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:09.


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