AlliedModders

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

~Ice*shOt 05-13-2009 13:43

error for ranks
 
I get error for this code:
PHP Code:

new const RANKS[20][] = {
"First"100,
"First"300,
"First"600,
"Super Natural"1000,
"Super Natural"1500,
"Super Natural"2100,
"Tank"2800,
"Tank"3600,
"Tank"4500,
"Posion"5500,
"Posion"6600,
"Posion"7800,
"Runner"9100,
"Runner"10500,
"Runner"12000,
"Hiper Electro"13600,
"Hiper Electro"15400,
"Hiper Electro"17300,
"Mystic Jumper"19300,
"Mystic Jumper" 21400


Error: initialization data exceeds declared size

I want to make a Ranks

fysiks 05-13-2009 13:53

Re: error for ranks
 
You can't store strings and integers in the same array.

PHP Code:

new const RANKS_VALUE[20] = {
    
100,
    
300,
    
600,
    
1000,
    
1500,
    
2100,
    
2800,
    
3600,
    
4500,
    
5500,
    
6600,
    
7800,
    
9100,
    
10500,
    
12000,
    
13600,
    
15400,
    
17300,
    
19300,
    
21400
}  

new const 
RANKS_NAME[20][] = {
    
"First",
    
"First",
    
"First",
    
"Super Natural",
    
"Super Natural",
    
"Super Natural",
    
"Tank",
    
"Tank",
    
"Tank",
    
"Posion",
    
"Posion",
    
"Posion",
    
"Runner",
    
"Runner",
    
"Runner",
    
"Hiper Electro",
    
"Hiper Electro",
    
"Hiper Electro",
    
"Mystic Jumper",
    
"Mystic Jumper"




All times are GMT -4. The time now is 01:27.

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