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



Textdraw help - Glossy42O - 08.11.2014

Hello! i wanna make a box banned

or whatever.. anyways i get errors and i have no idea why.

Код:
   Textdraw17[playerid] = CreatePlayerTextDraw(468.250000, 148.500000, "usebox");
   TextDrawLetterSize(Textdraw0, 0.000000, 15.627778);
   TextDrawTextSize(Textdraw0, 128.625000, 0.000000);
   TextDrawAlignment(Textdraw0, 1);
   TextDrawColor(Textdraw0, 0);
   TextDrawUseBox(Textdraw0, true);
   TextDrawBoxColor(Textdraw0, 102);
   TextDrawSetShadow(Textdraw0, 0);
   TextDrawSetOutline(Textdraw0, 0);
   TextDrawFont(Textdraw0, 0);

   Textdraw18[playerid] = CreatePlayerTextDraw(258.125000, 148.166702, "Banned");
   TextDrawLetterSize(Textdraw1, 0.582499, 2.019999);
   TextDrawAlignment(Textdraw1, 1);
   TextDrawColor(Textdraw1, -16776961);
   TextDrawSetShadow(Textdraw1, 0);
   TextDrawSetOutline(Textdraw1, 1);
   TextDrawBackgroundColor(Textdraw1, 51);
   TextDrawFont(Textdraw1, 1);
   TextDrawSetProportional(Textdraw1, 1);

   Textdraw19[playerid] = CreatePlayerTextDraw(155.000000, 184.333328, "You have been banned from LSCNR");
   TextDrawLetterSize(Textdraw2, 0.487500, 1.996665);
   TextDrawAlignment(Textdraw2, 1);
   TextDrawColor(Textdraw2, -16776961);
   TextDrawSetShadow(Textdraw2, 0);
   TextDrawSetOutline(Textdraw2, 1);
   TextDrawBackgroundColor(Textdraw2, 51);
   TextDrawFont(Textdraw2, 3);
   TextDrawSetProportional(Textdraw2, 1);

   Textdraw20[playerid] = CreatePlayerTextDraw(139.375000, 229.833312, "If you think this ban was wrong please make a ban appeal on");
   TextDrawLetterSize(Textdraw3, 0.275624, 1.407498);
   TextDrawAlignment(Textdraw3, 1);
   TextDrawColor(Textdraw3, -16776961);
   TextDrawSetShadow(Textdraw3, 0);
   TextDrawSetOutline(Textdraw3, 1);
   TextDrawBackgroundColor(Textdraw3, 51);
   TextDrawFont(Textdraw3, 3);
   TextDrawSetProportional(Textdraw3, 1);

   Textdraw21[playerid] = CreatePlayerTextDraw(playerid, 203.750000, 264.833312, "www.lscnrsamp.tk");
   PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.449999, 1.600000);
   PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
   PlayerTextDrawColor(playerid, Textdraw0[playerid], -5963521);
   PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
   PlayerTextDrawFont(playerid, Textdraw0[playerid], 2);
   PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
Код:
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(459) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(470) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(480) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(490) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(500) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(501) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(501) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(501) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(501) : fatal error 107: too many error messages on one line

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


9 Errors.



Re: Textdraw help - UltraScripter - 08.11.2014

Add
new playerid;


Re: Textdraw help - Glossy42O - 08.11.2014

PHP код:
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(459) : error 017undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(460) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(461) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(462) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(463) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(464) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(465) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(466) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(467) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(468) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(470) : error 017undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(471) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(472) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(473) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(474) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(475) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(477) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(478) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(480) : error 017undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(481) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(482) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(483) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(484) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(485) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(486) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(487) : error 035argument type mismatch (argument 1)

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


26 Errors




Re: Textdraw help - UltraScripter - 08.11.2014

Give the whole code


Re: Textdraw help - Glossy42O - 08.11.2014

Okay
PHP код:
   Textdraw17[playerid] = CreatePlayerTextDraw(468.250000148.500000"usebox");
   
TextDrawLetterSize(Textdraw170.00000015.627778);
   
TextDrawTextSize(Textdraw17128.6250000.000000);
   
TextDrawAlignment(Textdraw171);
   
TextDrawColor(Textdraw170);
   
TextDrawUseBox(Textdraw17true);
   
TextDrawBoxColor(Textdraw17102);
   
TextDrawSetShadow(Textdraw170);
   
TextDrawSetOutline(Textdraw170);
   
TextDrawFont(Textdraw170);

   
Textdraw18[playerid] = CreatePlayerTextDraw(258.125000148.166702"Banned");
   
TextDrawLetterSize(Textdraw180.5824992.019999);
   
TextDrawAlignment(Textdraw181);
   
TextDrawColor(Textdraw18, -16776961);
   
TextDrawSetShadow(Textdraw180);
   
TextDrawSetOutline(Textdraw181);
   
TextDrawBackgroundColor(Textdraw151);
   
TextDrawFont(Textdraw181);
   
TextDrawSetProportional(Textdraw181);

   
Textdraw19[playerid] = CreatePlayerTextDraw(155.000000184.333328"You have been banned from LSCNR");
   
TextDrawLetterSize(Textdraw190.4875001.996665);
   
TextDrawAlignment(Textdraw191);
   
TextDrawColor(Textdraw19, -16776961);
   
TextDrawSetShadow(Textdraw190);
   
TextDrawSetOutline(Textdraw191);
   
TextDrawBackgroundColor(Textdraw1951);
   
TextDrawFont(Textdraw193);
   
TextDrawSetProportional(Textdraw191);

   
Textdraw20[playerid] = CreatePlayerTextDraw(139.375000229.833312"If you think this ban was wrong please make a ban appeal on");
   
TextDrawLetterSize(Textdraw200.2756241.407498);
   
TextDrawAlignment(Textdraw201);
   
TextDrawColor(Textdraw20, -16776961);
   
TextDrawSetShadow(Textdraw200);
   
TextDrawSetOutline(Textdraw201);
   
TextDrawBackgroundColor(Textdraw2051);
   
TextDrawFont(Textdraw203);
   
TextDrawSetProportional(Textdraw201);

   
Textdraw21[playerid] = CreatePlayerTextDraw(playerid203.750000264.833312"www.lscnrsamp.tk");
   
PlayerTextDrawLetterSize(playeridTextdraw21[playerid], 0.4499991.600000);
   
PlayerTextDrawAlignment(playeridTextdraw21[playerid], 1);
   
PlayerTextDrawColor(playeridTextdraw21[playerid], -5963521);
   
PlayerTextDrawSetShadow(playeridTextdraw21[playerid], 0);
   
PlayerTextDrawSetOutline(playeridTextdraw21[playerid], 1);
   
PlayerTextDrawBackgroundColor(playeridTextdraw21[playerid], 51);
   
PlayerTextDrawFont(playeridTextdraw21[playerid], 2);
   
PlayerTextDrawSetProportional(playeridTextdraw21[playerid], 1); 
PHP код:
new PlayerText:Textdraw17[MAX_PLAYERS];
new 
PlayerText:Textdraw18[MAX_PLAYERS];
new 
PlayerText:Textdraw19[MAX_PLAYERS];
new 
PlayerText:Textdraw20[MAX_PLAYERS];
new 
PlayerText:Textdraw21[MAX_PLAYERS]; 



Re: Textdraw help - UltraScripter - 08.11.2014

Never mind
You need to add after textdraw example
TextDrawFont(draw17[playerid], 3);


Re: Textdraw help - Glossy42O - 08.11.2014

I don't really think so cause i got more text draws they are working great execpt that one.


Re: Textdraw help - Mic_H - 08.11.2014

Chage to this
Код:
new Text:Textdraw17[MAX_PLAYERS];
new Text:Textdraw18[MAX_PLAYERS];
new Text:Textdraw19[MAX_PLAYERS];
new Text:Textdraw20[MAX_PLAYERS];
new PlayerText:Textdraw21[MAX_PLAYERS];
+ The stock/public function which you are using to do this part doesnt have playerid. Try calling with that
Eg:
if You put this inside a function BanPlayer(pid) -> You have to change playerid to pid..
Just change pid to playerid and errors should go off


Re: Textdraw help - UltraScripter - 08.11.2014

If u write
new Draw17[MAX_PLAYERS];

You need to add after the textdraw[playerid]
Like Draw17[playerid]


Re: Textdraw help - Glossy42O - 08.11.2014

Quote:
Originally Posted by Mic_H
Посмотреть сообщение
Chage to this
Код:
new Text:Textdraw17[MAX_PLAYERS];
new Text:Textdraw18[MAX_PLAYERS];
new Text:Textdraw19[MAX_PLAYERS];
new Text:Textdraw20[MAX_PLAYERS];
new PlayerText:Textdraw21[MAX_PLAYERS];
+ The stock/public function which you are using to do this part doesnt have playerid. Try calling with that
Eg:
if You put this inside a function BanPlayer(pid) -> You have to change playerid to pid..
Just change pid to playerid and errors should go off
PHP код:
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(459) : error 017undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(459) : warning 213tag mismatch
C
:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(460) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(461) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(462) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(463) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(464) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(465) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(466) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(467) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(468) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(470) : error 017undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(470) : warning 213tag mismatch
C
:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(471) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(472) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(473) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(474) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(475) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(477) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(478) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(480) : error 017undefined symbol "playerid"
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(480) : warning 213tag mismatch
C
:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(481) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(482) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(483) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(484) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(485) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(486) : error 035argument type mismatch (argument 1)
C:\Users\yan\Desktop\LSCNR\gamemodes\LSCNR.pwn(487) : error 035argument type mismatch (argument 1)
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
26 Errors