SA-MP Forums Archive
Why this dont work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why this dont work? (/showthread.php?tid=356232)



Why this dont work? - Prosettur - 02.07.2012

Код:
				new Weapon[13][2];
				for(new X = 0; X < 13; X++)
				{
				    GetPlayerWeaponData(PlayerID,X,Weapon[X][0],Weapon[X][1]);
				}
				format(String,200,""WHITE">> Weapons: "DARK_WHITE"%i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i).",Weapon[0][0],Weapon[0][1],Weapon[1][0],Weapon[1][1],Weapon[2][0],Weapon[2][1],Weapon[3][0],Weapon[3][1],Weapon[4][0],Weapon[4][1],Weapon[5][0],Weapon[5][1],Weapon[6][0],Weapon[6][1],Weapon[7][0],Weapon[7][1],Weapon[8][0],Weapon[8][1]Weapon[9][0],Weapon[9][1],Weapon[10][0],Weapon[10][1],Weapon[11][0],Weapon[11][1],Weapon[12][0],Weapon[12][1]);
                SendClientMessage(playerid,0,String);
I press F5 and... crashed


Re: Why this dont work? - ryan39 - 02.07.2012

What's wrong exactly?


Re: Why this dont work? - Prosettur - 02.07.2012

Okay:
Код:
				new Weapon[13][2];
				for(new X = 0; X < 13; X++)
				{
				    GetPlayerWeaponData(PlayerID,X,Weapon[X][0],Weapon[X][1]);
				}
				format(String,200,""WHITE">> Weapons: "DARK_WHITE"%i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i).",Weapon[0][0],Weapon[0][1],Weapon[1][0],Weapon[1][1],Weapon[2][0],Weapon[2][1],Weapon[3][0],Weapon[3][1],Weapon[4][0],Weapon[4][1],Weapon[5][0],Weapon[5][1],Weapon[6][0],Weapon[6][1],Weapon[7][0],Weapon[7][1],Weapon[8][0],Weapon[8][1]Weapon[9][0],Weapon[9][1],Weapon[10][0],Weapon[10][1],Weapon[11][0],Weapon[11][1],
				Weapon[12][0],Weapon[12][1]);
                SendClientMessage(playerid,0,String);
And now
Quote:

C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : error 001: expected token: ",", but found "-identifier-"
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617) : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617 -- 61 : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(617 -- 61 : warning 215: expression has no effect
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(61 : error 001: expected token: ";", but found ")"
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(61 : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Pulpit\Serwer\gamemodes\GM.pwn(61 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.




Re: Why this dont work? - ryan39 - 02.07.2012

Код:
new Weapon[13][2];
				for(new X = 0; X < 13; X++)
				{
				    GetPlayerWeaponData(PlayerID,X,Weapon[X][0],Weapon[X][1]);
				}
				format(String,200,"WHITE>> Weapons: DARK_WHITE"%i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i).",Weapon[0][0],Weapon[0][1],Weapon[1][0],Weapon[1][1],Weapon[2][0],Weapon[2][1],Weapon[3][0],Weapon[3][1],Weapon[4][0],Weapon[4][1],Weapon[5][0],Weapon[5][1],Weapon[6][0],Weapon[6][1],Weapon[7][0],Weapon[7][1],Weapon[8][0],Weapon[8][1]Weapon[9][0],Weapon[9][1],Weapon[10][0],Weapon[10][1],Weapon[11][0],Weapon[11][1],
				Weapon[12][0],Weapon[12][1]);
                SendClientMessage(playerid,0,String);
Try that, your format is messed up like crazy.


Re: Why this dont work? - WagnerPM - 02.07.2012

Missing a comma

pawn Код:
new Weapon[13][2];
                for(new X = 0; X < 13; X++)
                {
                    GetPlayerWeaponData(PlayerID,X,Weapon[X][0],Weapon[X][1]);
                }
                format(String,200,"WHITE">> Weapons: "DARK_WHITE"%i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i), %i (%i).",Weapon[0][0],Weapon[0][1],Weapon[1][0],Weapon[1][1],Weapon[2][0],Weapon[2][1],Weapon[3][0],Weapon[3][1],Weapon[4][0],Weapon[4][1],Weapon[5][0],Weapon[5][1],Weapon[6][0],Weapon[6][1],Weapon[7][0],Weapon[7][1],Weapon[8][0],Weapon[8][1],Weapon[9][0],Weapon[9][1],Weapon[10][0],Weapon[10][1],Weapon[11][0],Weapon[11][1],Weapon[12][0],Weapon[12][1]);
                SendClientMessage(playerid,0,String);



Re: Why this dont work? - Prosettur - 02.07.2012

@up Big thx :d



Ehm, no.
Код:
#define WHITE "{FFFFFF}"
#define DARK_WHITE "{BBBBBB}"
All work on this format.