Error 048
#1

Код:
error 048: array dimensions do not match
error 048: array dimensions do not match
pawn Код:
format(pInfo,sizeof(pInfo)," ~g~ Level Up! ~w~ Your now level: [%d]",pInfo[playerid][pLevel]);
That is the line giving me the errors. Is there anything wrong with it?
Reply
#2

I think its not pInfo, try this but i'm not sure.

pawn Код:
format(string,sizeof(string)," ~g~ Level Up! ~w~ Your now level: [%d]",pInfo[playerid][pLevel]);
Reply
#3

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
I think its not pInfo, try this but i'm not sure.

pawn Код:
format(string,sizeof(string)," ~g~ Level Up! ~w~ Your now level: [%d]",pInfo[playerid][pLevel]);
When I added new string[128] I got this, without it I still got a few errors to so.

Код:
error 048: array dimensions do not match
Reply
#4

Quote:
Originally Posted by kujox222
Посмотреть сообщение
When I added new string[128] I got this, without it I still got a few errors to so.

Код:
error 048: array dimensions do not match
Try new string[256];
Reply
#5

pawn Код:
format(pInfo,sizeof(pInfo)," ~g~ Level Up! ~w~ Your now level: [%d]",pInfo[playerid][pLevel]);
Do you even see what you are doing?

You are defining A as "You are now level a" while A is obviously an integer, and therefor can not be formatted like this,
Reply
#6

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Try new string[256];
Код:
: error 048: array dimensions do not match
Gave me that error again.
Reply
#7

Quote:
Originally Posted by kujox222
Посмотреть сообщение
Код:
: error 048: array dimensions do not match
Gave me that error again.
Ow ffs,

pawn Код:
new string[128];
format(string,sizeof(string)," Level Up! Your now level: [%d]",pInfo[playerid][pLevel]);
SendClientMessage(playerid, -1, string);
Reply
#8

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Try new string[256];
This makes NO sense, as the size of a string is the maximum size to be used, and will never return a syntax error.
The worst it can do is not formatting the entire string because of the text being too long, but that is not what is happening.


Dimensions do not match can be explain as you trying to walk into the depth while playing a 2D game, which is not possible.
Reply
#9

Quote:
Originally Posted by milanosie
Посмотреть сообщение
This makes NO sense, as the size of a string is the maximum size to be used, and will never return a syntax error.
The worst it can do is not formatting the entire string because of the text being too long, but that is not what is happening.


Dimensions do not match can be explain as you trying to walk into the depth while playing a 2D game, which is not possible.
I told him the correct format but he didn't use his sense! :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)