AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   error compile (https://forums.alliedmods.net/showthread.php?t=274407)

elitecs 11-07-2015 13:21

error compile
 
why i can't compile this sma?

Bugsy 11-07-2015 13:28

Re: error compile
 
As the error says, if you initialize a variable at a set size and are setting a default value, you must set a value for every slot, or make the size smaller.

Here you are sizing both at 11, but only setting 8 values. So you can either change those 11's to 8's, or add 3 more values to each array.
PHP Code:

#define GROUPS_NAME        11
#define GROUPS_ACCESS        11

new GroupNames[GROUPS_NAME][] = {
    
"---== THE KING==---",
    
"---= Owner + V.I.P =---",
    
"---= Co Owner + V.I.P =---",
    
"---= Moderator =---",
    
"---= Administrator =---",
    
"---== VIP ==---",
    
"---== Helper ==---",
    
"---== Slot ==---"
}

new 
GroupFlags[GROUPS_ACCESS][] = {
    
"abcdefghijklmnopqrstu",
    
"abcdefghijmnoqprstu",
    
"abcdefghijmnoqprst",
    
"bcdefghijm",
    
"bcfeijoqrt",
    
"bcdefijm",
    
"bcfeij",
    
"b"



elitecs 11-07-2015 13:37

Re: error compile
 
can u fix it for me? :D i'm newbie

Bugsy 11-07-2015 13:43

Re: error compile
 
I told you what to do, change both 11's to 8's.

Code:

#define GROUPS_NAME        11
#define GROUPS_ACCESS        11


elitecs 11-07-2015 14:01

Re: error compile
 
Quote:

Originally Posted by Bugsy (Post 2360809)
I told you what to do, change both 11's to 8's.

Code:

#define GROUPS_NAME        11
#define GROUPS_ACCESS        11


thank you

elitecs 11-07-2015 14:16

Re: error compile
 
@Bugsy
why it don't show in a motd? :| it's working but not showing on a motd, it's like this now, and i want the text to be yellow not red :D
http://i.imgur.com/XHFM1um.png

Bugsy 11-07-2015 14:45

Re: error compile
 
What's not showing?

elitecs 11-07-2015 15:08

Re: error compile
 
Quote:

Originally Posted by Bugsy (Post 2360830)
What's not showing?

I mean i I want to appear the admins on a MOTD not text :D hope u understand


All times are GMT -4. The time now is 18:10.

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