AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compile Error (https://forums.alliedmods.net/showthread.php?t=223122)

@.SizNeR 08-10-2013 02:56

Compile Error
 
Can some one please help me?

Error:
Code:

Error: Expected token: "}", but found "-string-" on line 211
Code Error:
Code:

enum _:Data
{
        Cost[ 10 ],
        Health[ 5 ],
        Armor[ 5 ],
        Damage[ 3 ],
        CashBonus[ 5 ],
        Gravity[ 5 ],
        Speed[ 5 ]
};

new szKnives[ ][ Data ] =
{
        { "0",                "0",        "0",        "0",        "0",        "0",        "0.0"        },
        { "15000",        "7",        "10",        "3"        "25",        "3",        "0.1"        },
        { "45000",        "21",        "30",        "5",        "40",        "6",        "0.2"        },
        { "75000",        "35",        "50",        "8",        "55",        "10",        "0.25"        },
        { "125000",        "49",        "70",        "12",        "70",        "15",        "0.3"        },
        { "225000",        "63",        "90",        "16",        "90",        "26",        "0.35"        },
        { "400000",        "77",        "110",        "20",        "105",        "30",        "0.4"        },
        { "650000",        "84",        "130",        "25",        "125",        "49",        "0.45"        }
};


Black Rose 08-10-2013 03:21

Re: Compile Error
 
{ "15000", "7", "10", "3", "25", "3", "0.1" },

Seems like the strings are unnecessary.
Code:
enum Data {     Cost,     Health,     Armor,     Damage,     CashBonus,     Gravity,     Float:Speed }; new szKnives[][Data] = {     { 0,        00,      00,      0,  0.0 },     { 15000,    710,     325,     30.1 },     { 45000,    21, 30,     540,     6,  0.2 },     { 75000,    35, 50,     855,     10, 0.25 },     { 125000,   49, 70,     12, 70,     15, 0.3 },     { 225000,   63, 90,     16, 90,     26, 0.35 },     { 400000,   77, 110,    20, 105,    30, 0.4 },     { 650000,   84, 130,    25, 125,    49, 0.45 } };

@.SizNeR 08-10-2013 03:31

Re: Compile Error
 
Quote:

Originally Posted by Black Rose (Post 2009764)
{ "15000", "7", "10", "3", "25", "3", "0.1" },

Opps, Thanks :)


All times are GMT -4. The time now is 15:53.

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