how to solve this error
#1

//just an example
new arr[MAX_PLAYERS][50][2];
arr[playerid]={{0,1},{0,2}};

//errors
error 008: must be a constant expression; assumed zero
error 048: array dimensions do not match
Reply
#2

Код:
As you using.
arr[MAX_PLAYERS][2];

arr[playerid]
should be
arr[playerid][0] = 
arr[playerid][1] =
Reply
#3

If you have something like:

PHP код:
new arr[MAX_PLAYERS][50][2]; 
You can do:

PHP код:
arr[playerid][0][0] = 1//or some other value
arr[playerid][0][1] = 1//or some other value 
Reply
#4

but isnt there any other way for doing this, it waisting so many rows
Reply
#5

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
If you have something like:

PHP код:
new arr[MAX_PLAYERS][50][2]; 
You can do:

PHP код:
arr[playerid][0][0] = 1//or some other value
arr[playerid][0][1] = 1//or some other value 
sory i forget that i think Phenix is right.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)