D
D
Danil Samusev2021-05-15 19:54:33
Game development
Danil Samusev, 2021-05-15 19:54:33

How to fix such AMXX CS 1.6 error?

error: error 022: must be lvalue (non-constant)
Code:

enum _:SCORE
{
    FRAGS = 0,
    DEATHS = 0   //1
};

new g_iInfo[33][SCORE][2];

new iKiller = read_data(1);
new iVictim = read_data(2);

g_iInfo[iKiller][FRAGS]++;
g_iInfo[iVictim][DEATHS]++;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tukreb, 2021-05-15
@danilka238

I coded on amxx aka PAWN a long time ago, but I think it should be like this.
new g_iInfo[33][SCORE];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question