Textdraw please help and i will rep :3
#1

I get these errors:
Quote:

C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(761) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(762) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(763) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(764) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(765) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(766) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(767) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(76 : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(769) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(770) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(771) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(772) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(773) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(774) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(775) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(776) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(777) : error 035: argument type mismatch (argument 2)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(799) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(800) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(801) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(802) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(803) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(804) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(805) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(806) : error 035: argument type mismatch (argument 1)
C:\Users\Ahmed\Desktop\samp037_svr_R2-1-1_win32\gamemodes\C5School.pwn(807) : error 035: argument type mismatch (argument 1)

Quote:

TextDrawHideForPlayer(playerid, Ban0);
TextDrawHideForPlayer(playerid, Ban1);
TextDrawHideForPlayer(playerid, Ban2);
TextDrawHideForPlayer(playerid, Ban3);
TextDrawHideForPlayer(playerid, Ban4);
TextDrawHideForPlayer(playerid, Ban5);
TextDrawHideForPlayer(playerid, Ban6);
TextDrawHideForPlayer(playerid, Ban7);
TextDrawHideForPlayer(playerid, Ban;
TextDrawHideForPlayer(playerid, Ban9);
TextDrawHideForPlayer(playerid, Ban10);
TextDrawHideForPlayer(playerid, Ban11);
TextDrawHideForPlayer(playerid, Ban12);
TextDrawHideForPlayer(playerid, Ban13);
TextDrawHideForPlayer(playerid, Ban14);
TextDrawHideForPlayer(playerid, Ban15);
TextDrawHideForPlayer(playerid, Ban15);

Quote:

TextDrawDestroy(Ban0);
TextDrawDestroy(Ban1);
TextDrawDestroy(Ban2);
TextDrawDestroy(Ban3);
TextDrawDestroy(Ban4);
TextDrawDestroy(Ban5);
TextDrawDestroy(Ban6);
TextDrawDestroy(Ban7);
TextDrawDestroy(Ban;

but no errors here :
Quote:

TextDrawDestroy(Ban9);
TextDrawDestroy(Ban10);
TextDrawDestroy(Ban11);
TextDrawDestroy(Ban12);
TextDrawDestroy(Ban13);
TextDrawDestroy(Ban14);
TextDrawDestroy(Ban15);

Quote:

TextDrawShowForPlayer(playerid, Ban0);
TextDrawShowForPlayer(playerid, Ban1);
TextDrawShowForPlayer(playerid, Ban2);
TextDrawShowForPlayer(playerid, Ban3);
TextDrawShowForPlayer(playerid, Ban4);
TextDrawShowForPlayer(playerid, Ban5);
TextDrawShowForPlayer(playerid, Ban6);
TextDrawShowForPlayer(playerid, Ban7);
TextDrawShowForPlayer(playerid, Ban;
TextDrawShowForPlayer(playerid, Ban9);
TextDrawShowForPlayer(playerid, Ban10);
TextDrawShowForPlayer(playerid, Ban11);
TextDrawShowForPlayer(playerid, Ban12);
TextDrawShowForPlayer(playerid, Ban13);
TextDrawShowForPlayer(playerid, Ban14);
TextDrawShowForPlayer(playerid, Ban15);

any help please?! thanks and i will rep you
Reply
#2

Show the definitions of all of those textdraw variables.
Reply
#3

Here you go and thanks for your time
Quote:

new PlayerText:Ban0[MAX_PLAYERS];
new PlayerText:Ban1[MAX_PLAYERS];
new PlayerText:Ban2[MAX_PLAYERS];
new PlayerText:Ban3[MAX_PLAYERS];
new PlayerText:Ban4[MAX_PLAYERS];
new PlayerText:Ban5[MAX_PLAYERS];
new PlayerText:Ban6[MAX_PLAYERS];
new PlayerText:Ban7[MAX_PLAYERS];
new PlayerText:Ban8[MAX_PLAYERS];
new PlayerText:Ban9[MAX_PLAYERS];
new PlayerText:Ban10[MAX_PLAYERS];
new PlayerText:Ban11[MAX_PLAYERS];
new PlayerText:Ban12[MAX_PLAYERS];
new PlayerText:Ban13[MAX_PLAYERS];
new PlayerText:Ban14[MAX_PLAYERS];
new PlayerText:Ban15[MAX_PLAYERS];

Quote:

public OnPlayerConnect(playerid)
{
Ban0[playerid] = CreatePlayerTextDraw(playerid, 480.000000, 82.583297, "usebox");
PlayerTextDrawLetterSize(playerid, Ban0[playerid], 0.000000, 32.633346);
PlayerTextDrawTextSize(playerid, Ban0[playerid], 157.500000, 0.000000);
PlayerTextDrawAlignment(playerid, Ban0[playerid], 1);
PlayerTextDrawColor(playerid, Ban0[playerid], 0);
PlayerTextDrawUseBox(playerid, Ban0[playerid], true);
PlayerTextDrawBoxColor(playerid, Ban0[playerid], 102);
PlayerTextDrawSetShadow(playerid, Ban0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban0[playerid], 0);
PlayerTextDrawFont(playerid, Ban0[playerid], 0);

Ban1[playerid] = CreatePlayerTextDraw(playerid, 279.599975, 87.208320, "Banned!");
PlayerTextDrawLetterSize(playerid, Ban1[playerid], 0.521498, 2.445831);
PlayerTextDrawAlignment(playerid, Ban1[playerid], 1);
PlayerTextDrawColor(playerid, Ban1[playerid], -16776961);
PlayerTextDrawSetShadow(playerid, Ban1[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban1[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban1[playerid], 51);
PlayerTextDrawFont(playerid, Ban1[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban1[playerid], 1);

Ban2[playerid] = CreatePlayerTextDraw(playerid, 163.500000, 144.666809, "Name:");
PlayerTextDrawLetterSize(playerid, Ban2[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban2[playerid], 1);
PlayerTextDrawColor(playerid, Ban2[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban2[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban2[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban2[playerid], 51);
PlayerTextDrawFont(playerid, Ban2[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban2[playerid], 1);

Ban3[playerid] = CreatePlayerTextDraw(playerid, 162.150100, 176.108383, "Admin:");
PlayerTextDrawLetterSize(playerid, Ban3[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban3[playerid], 1);
PlayerTextDrawColor(playerid, Ban3[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban3[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban3[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban3[playerid], 51);
PlayerTextDrawFont(playerid, Ban3[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban3[playerid], 1);

Ban4[playerid] = CreatePlayerTextDraw(playerid, 162.650054, 209.941711, "Reason:");
PlayerTextDrawLetterSize(playerid, Ban4[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban4[playerid], 1);
PlayerTextDrawColor(playerid, Ban4[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban4[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban4[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban4[playerid], 51);
PlayerTextDrawFont(playerid, Ban4[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban4[playerid], 1);

Ban5[playerid] = CreatePlayerTextDraw(playerid, 162.550048, 241.441772, "Type:");
PlayerTextDrawLetterSize(playerid, Ban5[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban5[playerid], 1);
PlayerTextDrawColor(playerid, Ban5[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban5[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban5[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban5[playerid], 51);
PlayerTextDrawFont(playerid, Ban5[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban5[playerid], 1);

Ban6[playerid] = CreatePlayerTextDraw(playerid, 162.400070, 276.091674, "Date/Time:");
PlayerTextDrawLetterSize(playerid, Ban6[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban6[playerid], 1);
PlayerTextDrawColor(playerid, Ban6[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban6[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban6[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban6[playerid], 51);
PlayerTextDrawFont(playerid, Ban6[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban6[playerid], 1);

Ban7[playerid] = CreatePlayerTextDraw(playerid, 161.349990, 301.758392, "If you think this ban is invaild/wrong, please appeal here:");
PlayerTextDrawLetterSize(playerid, Ban7[playerid], 0.224498, 1.553333);
PlayerTextDrawAlignment(playerid, Ban7[playerid], 1);
PlayerTextDrawColor(playerid, Ban7[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban7[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban7[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban7[playerid], 51);
PlayerTextDrawFont(playerid, Ban7[playerid], 2);
PlayerTextDrawSetProportional(playerid, Ban7[playerid], 1);

Ban8[playerid] = CreatePlayerTextDraw(playerid, 256.250091, 318.617156, "www.xnxx.com");
PlayerTextDrawLetterSize(playerid, Ban8[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban8[playerid], 1);
PlayerTextDrawColor(playerid, Ban8[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban8[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban8[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban8[playerid], 51);
PlayerTextDrawFont(playerid, Ban8[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban8[playerid], 1);

Ban9[playerid] = CreatePlayerTextDraw(playerid, 299.500000, 356.999877, "Ok");
PlayerTextDrawLetterSize(playerid, Ban9[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban9[playerid], 1);
PlayerTextDrawColor(playerid, Ban9[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban9[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban9[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban9[playerid], 51);
PlayerTextDrawFont(playerid, Ban9[playerid], 2);
PlayerTextDrawSetProportional(playerid, Ban9[playerid], 1);
PlayerTextDrawSetSelectable(playerid, Ban9[playerid], true);

Ban10[playerid] = CreatePlayerTextDraw(playerid, 356.000000, 353.250000, "usebox");
PlayerTextDrawLetterSize(playerid, Ban10[playerid], 0.000000, 2.535187);
PlayerTextDrawTextSize(playerid, Ban10[playerid], 272.000000, 0.000000);
PlayerTextDrawAlignment(playerid, Ban10[playerid], 1);
PlayerTextDrawColor(playerid, Ban10[playerid], 0);
PlayerTextDrawUseBox(playerid, Ban10[playerid], true);
PlayerTextDrawBoxColor(playerid, Ban10[playerid], 102);
PlayerTextDrawSetShadow(playerid, Ban10[playerid], 861);
PlayerTextDrawSetOutline(playerid, Ban10[playerid], 0);
PlayerTextDrawFont(playerid, Ban10[playerid], 1);
PlayerTextDrawSetSelectable(playerid, Ban10[playerid], true);

Ban11[playerid] = CreatePlayerTextDraw(playerid, 214.000000, 145.250015, " ");
PlayerTextDrawLetterSize(playerid, Ban11[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban11[playerid], 1);
PlayerTextDrawColor(playerid, Ban11[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban11[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban11[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban11[playerid], 51);
PlayerTextDrawFont(playerid, Ban11[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban11[playerid], 1);

Ban12[playerid] = CreatePlayerTextDraw(playerid, 216.300018, 176.691680, " ");
PlayerTextDrawLetterSize(playerid, Ban12[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban12[playerid], 1);
PlayerTextDrawColor(playerid, Ban12[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban12[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban12[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban12[playerid], 51);
PlayerTextDrawFont(playerid, Ban12[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban12[playerid], 1);

Ban13[playerid] = CreatePlayerTextDraw(playerid, 223.249984, 210.525009, " ");
PlayerTextDrawLetterSize(playerid, Ban13[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban13[playerid], 1);
PlayerTextDrawColor(playerid, Ban13[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban13[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban13[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban13[playerid], 51);
PlayerTextDrawFont(playerid, Ban13[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban13[playerid], 1);

Ban14[playerid] = CreatePlayerTextDraw(playerid, 206.350006, 243.016723, " ");
PlayerTextDrawLetterSize(playerid, Ban14[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban14[playerid], 1);
PlayerTextDrawColor(playerid, Ban14[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban14[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban14[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban14[playerid], 51);
PlayerTextDrawFont(playerid, Ban14[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban14[playerid], 1);

Ban15[playerid] = CreatePlayerTextDraw(playerid, 246.500000, 277.666687, " ");
PlayerTextDrawLetterSize(playerid, Ban15[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Ban15[playerid], 1);
PlayerTextDrawColor(playerid, Ban15[playerid], -1);
PlayerTextDrawSetShadow(playerid, Ban15[playerid], 0);
PlayerTextDrawSetOutline(playerid, Ban15[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Ban15[playerid], 51);
PlayerTextDrawFont(playerid, Ban15[playerid], 1);
PlayerTextDrawSetProportional(playerid, Ban15[playerid], 1);
return 1;
}

Reply
#4

PlayerTextDrawShow ( https://sampwiki.blast.hk/wiki/PlayerTextDrawShow )
PlayerTextDrawHide ( https://sampwiki.blast.hk/wiki/PlayerTextDrawHide )
PlayerTextDrawDestroy ( https://sampwiki.blast.hk/wiki/PlayerTextDrawDestroy )
Reply
#5

Yup, DRIFT' got it. You are using global functions on per-player elements.
Reply
#6

it still gives the same warnings,any ideas?!!
Quote:

CMD:ban(playerid, params[])
{
PlayerTextDrawShow (playerid, Ban0);
PlayerTextDrawShow (playerid, Ban1);
PlayerTextDrawShow (playerid, Ban2);
PlayerTextDrawShow (playerid, Ban3);
PlayerTextDrawShow (playerid, Ban4);
PlayerTextDrawShow (playerid, Ban5);
PlayerTextDrawShow (playerid, Ban6);
PlayerTextDrawShow (playerid, Ban7);
PlayerTextDrawShow (playerid, Ban;
PlayerTextDrawShow (playerid, Ban9);
PlayerTextDrawShow (playerid, Ban10);
PlayerTextDrawShow (playerid, Ban11);
PlayerTextDrawShow (playerid, Ban12);
PlayerTextDrawShow (playerid, Ban13);
PlayerTextDrawShow (playerid, Ban14);
PlayerTextDrawShow (playerid, Ban15);

Reply
#7

PHP код:
PlayerTextDrawShow (playeridBan0[playerid]);
PlayerTextDrawShow (playeridBan1[playerid]);
PlayerTextDrawShow (playeridBan2[playerid]);
PlayerTextDrawShow (playeridBan3[playerid]);
PlayerTextDrawShow (playeridBan4[playerid]);
PlayerTextDrawShow (playeridBan5[playerid]);
PlayerTextDrawShow (playeridBan6[playerid]);
PlayerTextDrawShow (playeridBan7[playerid]);
PlayerTextDrawShow (playeridBan8[playerid]);
PlayerTextDrawShow (playeridBan9[playerid]);
PlayerTextDrawShow (playeridBan10[playerid]);
PlayerTextDrawShow (playeridBan11[playerid]);
PlayerTextDrawShow (playeridBan12[playerid]);
PlayerTextDrawShow (playeridBan13[playerid]);
PlayerTextDrawShow (playeridBan14[playerid]);
PlayerTextDrawShow (playeridBan15[playerid]); 
Reply
#8

try this


Код:
CMD:ban(playerid, params[])
{
PlayerTextDrawShow (playerid, Ban0[playerid]);
PlayerTextDrawShow (playerid, Ban1[playerid]);
PlayerTextDrawShow (playerid, Ban2[playerid]);
PlayerTextDrawShow (playerid, Ban3[playerid]);
PlayerTextDrawShow (playerid, Ban4[playerid]);
PlayerTextDrawShow (playerid, Ban5[playerid]);
PlayerTextDrawShow (playerid, Ban6[playerid]);
PlayerTextDrawShow (playerid, Ban7[playerid]);
PlayerTextDrawShow (playerid, Ban8[playerid]);
PlayerTextDrawShow (playerid, Ban9[playerid]);
PlayerTextDrawShow (playerid, Ban10[playerid]);
PlayerTextDrawShow (playerid, Ban11[playerid]);
PlayerTextDrawShow (playerid, Ban12[playerid]);
PlayerTextDrawShow (playerid, Ban13[playerid]);
PlayerTextDrawShow (playerid, Ban14[playerid]);
PlayerTextDrawShow (playerid, Ban15[playerid]);
Reply
#9

Thank you very much M8,it works now and gives no errors repution,i just forgot to put that [playerid]
i gave the all who posted here reputions but i can't give you silver as i gave too much today (the limit) i will give you one tomorrow thanks silver and gurmani11 and all who posted here,you all helped me!
Reply
#10

Quote:
Originally Posted by ahmedraed
Посмотреть сообщение
Thank you very much M8,it works now and gives no errors repution,i just forgot to put that [playerid]
i gave the all who posted here reputions but i can't give you silver as i gave too much today (the limit) i will give you one tomorrow thanks silver and gurmani11 and all who posted here,you all helped me!

You're welcome, if you got an error again , just tell me or post in here again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)