SA-MP Forums Archive
Help me Erro - 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: Help me Erro (/showthread.php?tid=654941)



Help me Erro - nguyenthanhdanhsamp - 09.06.2018

I edit Textdraw but erro, Help me


./includes/ngg.pwn(10701) : error 017: undefined symbol "khonglenhx"
./includes/ngg.pwn(10701) : warning 215: expression has no effect
./includes/ngg.pwn(10701) : error 001: expected token: ";", but found "]"
./includes/ngg.pwn(10701) : error 029: invalid expression, assumed zero
./includes/ngg.pwn(10701) : fatal error 107: too many error messages on one line



Код HTML:
new Text:Khonglenhx;
new Text:Khonglenhy;
new Text:Khonglenhz;

// Forwart
forward Hidekhonglenh(playerid);
public Hidekhonglenh(playerid)
{
    TextDrawHideForPlayer(playerid, khonglenh[0]);
    return 1;
}

//  CMDTEXT
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
		TextDrawShowForPlayer(playerid, khonglenh[0]);
		SetTimerEx("Hidekhonglenh", 1000, false, "i", playerid);
    }
    return 1;
}

// Textdraw
Khonglenhx = TextDrawCreate(403.875000, 363.750000, "usebox");
TextDrawLetterSize(Khonglenhx, 0.000000, 0.914812);
TextDrawTextSize(Khonglenhx, 241.125000, 0.000000);
TextDrawAlignment(Khonglenhx, 1);
TextDrawColor(Khonglenhx, 0);
TextDrawUseBox(Khonglenhx, true);
TextDrawBoxColor(Khonglenhx, 102);
TextDrawSetShadow(Khonglenhx, 0);
TextDrawSetOutline(Khonglenhx, 0);
TextDrawFont(Khonglenhx, 0);

Khonglenhy = TextDrawCreate(398.875000, 364.333312, "usebox");
TextDrawLetterSize(Khonglenhy, 0.000000, 0.785187);
TextDrawTextSize(Khonglenhy, 246.750000, 0.000000);
TextDrawAlignment(Khonglenhy, 1);
TextDrawColor(Khonglenhy, 0);
TextDrawUseBox(Khonglenhy, true);
TextDrawBoxColor(Khonglenhy, 255);
TextDrawSetShadow(Khonglenhy, 0);
TextDrawSetOutline(Khonglenhy, 0);
TextDrawBackgroundColor(Khonglenhy, 255);
TextDrawFont(Khonglenhy, 0);

Khonglenhz = TextDrawCreate(252.500000, 361.666625, "GRPG: Khong co lenh nay");
TextDrawLetterSize(Khonglenhz, 0.251249, 1.191666);
TextDrawAlignment(Khonglenhz, 1);
TextDrawColor(Khonglenhz, -1);
TextDrawSetShadow(Khonglenhz, 0);
TextDrawSetOutline(Khonglenhz, 1);
TextDrawBackgroundColor(Khonglenhz, 51);
TextDrawFont(Khonglenhz, 2);
TextDrawSetProportional(Khonglenhz, 1);



Re: Help me Erro - Livity - 09.06.2018

you need to put the textdraw before you can use it, in other words create the text under OnGameModeInIt


Re: Help me Erro - Mike861 - 10.06.2018

Put the code where you create the textdraws under OnGameModeInit, and you may show or hide them via
Код:
TextDrawShowForPlayer(playerid, textid);
or
Код:
TextDrawHideForPlayer(playerid, Textdraw[playerid]);



Re: Help me Erro - nguyenthanhdanhsamp - 10.06.2018

Quote:
Originally Posted by Mike861
Посмотреть сообщение
Put the code where you create the textdraws under OnGameModeInit, and you may show or hide them via
Код:
TextDrawShowForPlayer(playerid, textid);
or
Код:
TextDrawHideForPlayer(playerid, Textdraw[playerid]);
I am afraid of inserting the wrong, can you help me milk the error then give me new posts are not?


Re: Help me Erro - Pottus - 10.06.2018

Quote:
Originally Posted by nguyenthanhdanhsamp
Посмотреть сообщение
I am afraid of inserting the wrong, can you help me milk the error then give me new posts are not?
Yes, I can help you milk the error let me get my wife's breast pump and we will insert that that right way.