14.11.2011, 12:22
I tried to appear the result but I got two errors at lines 15950 and 15954. The error was this:
What is wrong. I also add on MathsResult global variable.
pawn Код:
error 033: array must be indexed (variable "MathsResult")
pawn Код:
new
string[128],
MathsResult[MAX_PLAYERS],
number = random(101),
number2 = random(101),
maths = random(2)
;
if(maths == 0) {
format(string, sizeof(string), "%d + %d", number, number2);
MathsResult = number + number2; //15950
}
else {
format(string, sizeof(string), "%d - %d", number, number2);
MathsResult = number - number2; //15954
}