SA-MP Forums Archive
error help - 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: error help (/showthread.php?tid=577175)



error help - Armageddonz - 09.06.2015

i got this warning
Код:
]C:\Users\Armageddon\Desktop\Samp Server RC6\gamemodes\Gamemode.pwn(609) : warning 203: symbol is never used: "playerid"
on my textdraw

Код:
PlayerTextDraws_DJ(playerid)
{
	DJ_Box1 = TextDrawCreate(443.600006, 119.473327, "Main_Box");
	TextDrawLetterSize(DJ_Box1, 0.000000, 33.117408);
	TextDrawTextSize(DJ_Box1, 181.199996, 0.000000);
	TextDrawAlignment(DJ_Box1, 1);
	TextDrawColor(DJ_Box1, 0);
	TextDrawUseBox(DJ_Box1, true);
	TextDrawBoxColor(DJ_Box1, 102);
	TextDrawSetShadow(DJ_Box1, 0);
	TextDrawSetOutline(DJ_Box1, 0);
	TextDrawFont(DJ_Box1, 0);
}
other textdraw is working fine but this give me a warning...


Re: error help - Konstantinos - 09.06.2015

if(PlayerInfo[playerid][pDJ] == 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 4))

Extra closed parenthesis, remove the red one and:

PlayerTextDraws_DJ()


Re: error help - Yates - 09.06.2015

Wait, is that else allowed to never be opened or closed by curly brackets like that?


Re: error help - Armageddonz - 09.06.2015

ok the first problem is fixed,now the second problem is still persist..when i try this code PlayerTextDraws_DJ()

it returns me a warning back


Re: error help - Rabea - 09.06.2015

Quote:
Originally Posted by Yates
Посмотреть сообщение
Wait, is that else allowed to never be opened or closed by curly brackets like that?
yeah, this just to define playerid.
you can do "public OnPlayerConnect()" anything.


Re: error help - Armageddonz - 09.06.2015

actually this is the whole script

Код:
 PlayerTextDraw_DJ(playerid)
{
	DJ_Box1 = TextDrawCreate(443.600006, 119.473327, "Main_Box");
	TextDrawLetterSize(DJ_Box1, 0.000000, 33.117408);
	TextDrawTextSize(DJ_Box1, 181.199996, 0.000000);
	TextDrawAlignment(DJ_Box1, 1);
	TextDrawColor(DJ_Box1, 0);
	TextDrawUseBox(DJ_Box1, true);
	TextDrawBoxColor(DJ_Box1, 102);
	TextDrawSetShadow(DJ_Box1, 0);
	TextDrawSetOutline(DJ_Box1, 0);
	TextDrawFont(DJ_Box1, 0);
	
	DJ_Title = TextDrawCreate(264.799835, 115.733291, "DJ Mixer");
	TextDrawLetterSize(DJ_Title, 0.433999, 1.674666);
	TextDrawAlignment(DJ_Title, 1);
	TextDrawColor(DJ_Title, -1);
	TextDrawSetShadow(DJ_Title, 0);
	TextDrawSetOutline(DJ_Title, 1);
	TextDrawBackgroundColor(DJ_Title, 51);
	TextDrawFont(DJ_Title, 2);
	TextDrawSetProportional(DJ_Title, 1);

	DJ_StreamButton = TextDrawCreate(272.800079, 162.026611, "STREAM");
	TextDrawLetterSize(DJ_StreamButton, 0.449999, 1.600000);
	TextDrawAlignment(DJ_StreamButton, 1);
	TextDrawColor(DJ_StreamButton, 16711935);
	TextDrawSetShadow(DJ_StreamButton, 0);
	TextDrawSetOutline(DJ_StreamButton, 1);
	TextDrawBackgroundColor(DJ_StreamButton, 51);
	TextDrawFont(DJ_StreamButton, 2);
	TextDrawSetProportional(DJ_StreamButton, 1);


	DJ_StopStream = TextDrawCreate(246.600128, 207.826721, "Stop stream");
	TextDrawLetterSize(DJ_StopStream , 0.449999, 1.600000);
	TextDrawAlignment(DJ_StopStream , 1);
	TextDrawColor(DJ_StopStream , -16776961);
	TextDrawSetShadow(DJ_StopStream , 0);
	TextDrawSetOutline(DJ_StopStream , 1);
	TextDrawBackgroundColor(DJ_StopStream , 51);
	TextDrawFont(DJ_StopStream , 2);
	TextDrawSetProportional(DJ_StopStream , 1);

	DJ_FavouriteSong = TextDrawCreate(236.400054, 255.866729, "Favourite Song");
	TextDrawLetterSize(DJ_FavouriteSong, 0.421999, 1.637333);
	TextDrawAlignment(DJ_FavouriteSong, 1);
	TextDrawColor(DJ_FavouriteSong, -1);
	TextDrawSetShadow(DJ_FavouriteSong, 0);
	TextDrawSetOutline(DJ_FavouriteSong, 1);
	TextDrawBackgroundColor(DJ_FavouriteSong, 51);
	TextDrawFont(DJ_FavouriteSong, 2);
	TextDrawSetProportional(DJ_FavouriteSong, 1);

	DJ_StreamHistory = TextDrawCreate(235.800048, 303.160156, "Stream History");
	TextDrawLetterSize(DJ_StreamHistory , 0.421999, 1.600000);
	TextDrawAlignment(DJ_StreamHistory , 1);
	TextDrawColor(DJ_StreamHistory , -1);
	TextDrawSetShadow(DJ_StreamHistory , 0);
	TextDrawSetOutline(DJ_StreamHistory , 1);
	TextDrawBackgroundColor(DJ_StreamHistory , 51);
	TextDrawFont(DJ_StreamHistory , 2);
	TextDrawSetProportional(DJ_StreamHistory , 1);
	
	DJ_Cancel = TextDrawCreate(271.999938, 350.186614, "CANCEL");
	TextDrawLetterSize(DJ_Cancel, 0.449999, 1.600000);
	TextDrawAlignment(DJ_Cancel, 1);
	TextDrawColor(DJ_Cancel, -1);
	TextDrawSetShadow(DJ_Cancel, 0);
	TextDrawSetOutline(DJ_Cancel, 1);
	TextDrawBackgroundColor(DJ_Cancel, 51);
	TextDrawFont(DJ_Cancel, 2);
	TextDrawSetProportional(DJ_Cancel, 1);


	DJ_Text = TextDrawCreate(188.000320, 400.959991, "Happy Working With Those Drop!!");
	TextDrawLetterSize(DJ_Text, 0.430000, 1.712000);
	TextDrawAlignment(DJ_Text, 1);
	TextDrawColor(DJ_Text, -1);
	TextDrawSetShadow(DJ_Text, 0);
	TextDrawSetOutline(DJ_Text, 1);
	TextDrawBackgroundColor(DJ_Text, 51);
	TextDrawFont(DJ_Text, 1);
	TextDrawSetProportional(DJ_Text, 1);

	DJ_Box2 = TextDrawCreate(394.799987, 158.300003, "usebox");
	TextDrawLetterSize(DJ_Box2 , 0.000000, 2.587036);
	TextDrawTextSize(DJ_Box2 , 227.599990, 0.000000);
	TextDrawAlignment(DJ_Box2 , 1);
	TextDrawColor(DJ_Box2 , 0);
	TextDrawUseBox(DJ_Box2 , true);
	TextDrawBoxColor(DJ_Box2 , 102);
	TextDrawSetShadow(DJ_Box2 , 0);
	TextDrawSetOutline(DJ_Box2 , 0);
	TextDrawFont(DJ_Box2 , 0);

	DJ_Box3 = TextDrawCreate(395.799987, 204.100021, "usebox");
	TextDrawLetterSize(DJ_Box3, 0.000000, 2.587036);
	TextDrawTextSize(DJ_Box3, 227.599975, 0.000000);
	TextDrawAlignment(DJ_Box3, 1);
	TextDrawColor(DJ_Box3, 0);
	TextDrawUseBox(DJ_Box3, true);
	TextDrawBoxColor(DJ_Box3, 102);
	TextDrawSetShadow(DJ_Box3, 0);
	TextDrawSetOutline(DJ_Box3, 0);
	TextDrawFont(DJ_Box3, 0);

	DJ_Box4 = TextDrawCreate(396.799896, 251.393417, "usebox");
	TextDrawLetterSize(DJ_Box4, 0.000000, 2.587035);
	TextDrawTextSize(DJ_Box4, 227.600036, 0.000000);
	TextDrawAlignment(DJ_Box4, 1);
	TextDrawColor(DJ_Box4, 0);
	TextDrawUseBox(DJ_Box4, true);
	TextDrawBoxColor(DJ_Box4, 102);
	TextDrawSetShadow(DJ_Box4, 0);
	TextDrawSetOutline(DJ_Box4, 0);
	TextDrawFont(DJ_Box4, 0);

	DJ_Box5 = TextDrawCreate(396.199920, 299.433593, "usebox");
	TextDrawLetterSize(DJ_Box5, 0.000000, 2.587035);
	TextDrawTextSize(DJ_Box5, 226.000015, 0.000000);
	TextDrawAlignment(DJ_Box5, 1);
	TextDrawColor(DJ_Box5, 0);
	TextDrawUseBox(DJ_Box5, true);
	TextDrawBoxColor(DJ_Box5, 102);
	TextDrawSetShadow(DJ_Box5, 0);
	TextDrawSetOutline(DJ_Box5, 0);
	TextDrawFont(DJ_Box5, 0);

	DJ_Box6 = TextDrawCreate(359.600006, 157.553329, "usebox");
	TextDrawLetterSize(DJ_Box6, 0.000000, 0.000000);
	TextDrawTextSize(DJ_Box6, 359.600006, 0.000000);
	TextDrawAlignment(DJ_Box6, 1);
	TextDrawColor(DJ_Box6, 0);
	TextDrawUseBox(DJ_Box6, true);
	TextDrawBoxColor(DJ_Box6, 102);
	TextDrawSetShadow(DJ_Box6, 0);
	TextDrawSetOutline(DJ_Box6, 0);
	TextDrawFont(DJ_Box6, 0);

	DJ_Box7 = TextDrawCreate(283.600006, 153.073333, "usebox");
	TextDrawLetterSize(DJ_Box7, 0.000000, 0.000000);
	TextDrawTextSize(DJ_Box7, 283.600006, 0.000000);
	TextDrawAlignment(DJ_Box7, 1);
	TextDrawColor(DJ_Box7, 0);
	TextDrawUseBox(DJ_Box7, true);
	TextDrawBoxColor(DJ_Box7, 102);
	TextDrawSetShadow(DJ_Box7, 0);
	TextDrawSetOutline(DJ_Box7, 0);
	TextDrawFont(DJ_Box7, 0);
	
	DJ_Box8 = TextDrawCreate(346.799987, 348.699890, "usebox");
	TextDrawLetterSize(DJ_Box8, 0.000000, 2.089257);
	TextDrawTextSize(DJ_Box8, 262.000000, 0.000000);
	TextDrawAlignment(DJ_Box8, 1);
	TextDrawColor(DJ_Box8, 0);
	TextDrawUseBox(DJ_Box8, true);
	TextDrawBoxColor(DJ_Box8, 102);
	TextDrawSetShadow(DJ_Box8, 0);
	TextDrawSetOutline(DJ_Box8, 0);
	TextDrawFont(DJ_Box8, 0);
	
}
but it give me a warning

Код:
 warning 203: symbol is never used: "playerid"