Weird error: invalid symbol name and invalid function or declaration
#1

Hello,

I trying to write a simple variable to store the config values, but i get two errors:
- error 020: invalid symbol name ""
- error 010: invalid function or declaration

pawn Код:
#define CONF_SIZE           7
#define CONF_BASE       (50)
new Conf[CONF_SIZE][3] =
{
    { 10, CONF_BASE, 0 },
    { 10 * 5, CONF_BASE * 5 * 1.05,  5 },
    { 10 * 10, CONF_BASE * 10 * 1.10, 10 }, // error 020: invalid symbol name ""
    { 10 * 50, CONF_BASE * 50 * 1.15, 15 },
    { 10 * 100, CONF_BASE * 100 * 1.20, 20 },
    { 10 * 500, CONF_BASE * 500 * 1.25, 25 },
    { 10 * 1000, CONF_BASE * 1000 * 1.30, 30 }
};// error 010: invalid function or declaration
I hope somebody can help me.
Reply
#2

You're attempting to declare float values inside an integer, by default. This is impossible, you need to go by another way.

pawn Код:
#define CONF_SIZE           7
#define CONF_BASE           (50)

enum skeletonConf
{
    skeleton_1,
    Float:skeleton_2,
    skeleton_3
}
new Conf[CONF_SIZE][skeletonConf];

// Usage:
/* Conf[0][skeleton_1] = 10;
Conf[0][skeleton_2] = CONF_BASE * 5 * 1.05;
Conf[0][skeleton_3] = 5; */
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)