Error Help. [+REP]
#1

This is the code:

pawn Код:
new cc = random(9999);
new ccs[64];
format(ccs, sizeof(ccs), "CC%d%d", cc, level);
PlayerInfo[giveplayerid][pCC] = ccs; // this line has the error
Here's the error:

pawn Код:
must be assigned to an array
I dont see anything wrong with that.. can anyone help me?
Reply
#2

You can't make this with strings. Use format.
pawn Код:
PlayerInfo[giveplayerid][pCC] = ccs;
pawn Код:
new cc = random(9999);
format(PlayerInfo[giveplayerid][pCC], sizeof(PlayerInfo[giveplayerid][pCC]), "CC%d%d", cc, level);
Reply
#3

pawn Код:
PlayerInfo[giveplayerid][pCC] = level;
..?
Reply
#4

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
You can't make this with strings. Use format.
pawn Код:
PlayerInfo[giveplayerid][pCC] = ccs;
pawn Код:
new cc = random(9999);
format(PlayerInfo[giveplayerid][pCC], sizeof(PlayerInfo[giveplayerid][pCC]), "CC%d%d", cc, level);
Fail... Only caused more errors, you sure you know what your talking about?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)