Save all nick's players
#5

Quote:
Originally Posted by dice7
You can't use sizeof like this
pawn Код:
sizeof(originalnick[playerid])
even if you're using 2d arrays. Just add the max number of cells minus 1 instead of sizeof
Of course he can, and it's possible with any amount of dimensions.

pawn Код:
sizeof(originalnick[])
Quote:
Originally Posted by cοοp
Maybe you should remove the [playerid], like this:

pawn Код:
GetPlayerName(playerid,originalnick,sizeof(originalnick));
That will get the first dimension size, aka MAX_PLAYERS.

pawn Код:
new array[10][20][30];
printf("%d", sizeof array);   // 10
printf("%d", sizeof array[]);  // 20
printf("%d", sizeof array[][]); // 30
Reply


Messages In This Thread
Save all nick's players - by Murd0cK - 06.07.2009, 09:32
Re: Save all nick's players - by dice7 - 06.07.2009, 09:49
Re: Save all nick's players - by Murd0cK - 06.07.2009, 10:01
Re: Save all nick's players - by refshal - 06.07.2009, 10:23
Re: Save all nick's players - by yom - 06.07.2009, 10:26
Re: Save all nick's players - by Murd0cK - 06.07.2009, 10:38
Re: Save all nick's players - by Murd0cK - 06.07.2009, 11:59
Re: Save all nick's players - by yom - 06.07.2009, 14:04
Re: Save all nick's players - by Murd0cK - 06.07.2009, 16:50

Forum Jump:


Users browsing this thread: 2 Guest(s)