PlayerTextDraw -
pors - 23.05.2016
Can you help me
Код:
error 017: undefined symbol "playerid"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Код:
#include <a_samp>
#include <zcmd>
#pragma tabsize 0
new MessageStr[5][128];
new PlayerText:Message[5];
public OnFilterScriptInit()
{
for(new line; line<5; line++)
{
format(MessageStr[line], 128, " ");
}
Message[playerid][0] = CreatePlayerTextDraw(300, 100+200, MessageStr[0]);
Message[playerid][1] = CreatePlayerTextDraw(300, 112+200, MessageStr[1]);
Message[playerid][2] = CreatePlayerTextDraw(300, 124+200, MessageStr[2]);
Message[playerid][3] = CreatePlayerTextDraw(300, 136+200, MessageStr[3]);
Message[playerid][4] = CreatePlayerTextDraw(300, 148+200, MessageStr[4]);
for(new line; line<5; line++)
{
PlayerTextDrawLetterSize(playerid,Message[line], 0.249999, 1.199998);
PlayerTextDrawSetShadow(playerid,Message[line], 0);
PlayerTextDrawAlignment(playerid,Message[line], 1);
PlayerTextDrawFont(playerid,Message[line], 1);
PlayerTextDrawSetShadow(playerid,Message[line]);
PlayerTextDrawShow(playerid, Message[line][playerid]);
}
for(new line; line<5; line++)
{
PlayerTextDrawLetterSize(playerid,Message[line], 0.249999, 1.199998);
PlayerTextDrawSetShadow(playerid,Message[line], 0);
PlayerTextDrawAlignment(playerid,Message[line], 1);
PlayerTextDrawTextSize(playerid,Message[line], 640, 480);
PlayerTextDrawFont(playerid,Message[line], 1);
PlayerTextDrawSetOutline(playerid,Message[line], 1);
PlayerTextDrawSetShadow(playerid,Message[line]);
PlayerTextDrawShow(playerid, Message[line][playerid]);
}
return 1;
}
public OnFilterScriptExit()
{
for(new line; line<5; line++)
{
PlayerTextDrawDestroy(playerid,Message[line][playerid]);
}
return 1;
}
CMD:lvairport(playerid, params[])
{
#pragma unused params
new stringD[128];
format(stringD, sizeof(stringD), "~r~~h~You've been teleported to Las Venturas Airport.");
SendLeMessage(playerid, stringD);
SetPlayerPos(playerid, 1487.9703,1736.9537,10.8125);
return 1;
}
stock SendLeMessage(playerid, const text[])
{
for(new line; line < 5; line++)
{
PlayerTextDrawShow(playerid, Message[line]);
}
for(new line; line < 5; line++)
{
PlayerTextDrawHide(playerid,Message[line]);
if(line < 4)
{
MessageStr[line] = MessageStr[line+1];
TextDrawSetString(Message[line], MessageStr[line]);
}
}
format(MessageStr[4], 128, "%s",text);
TextDrawSetString(Message[4], MessageStr[4]);
for(new line; line < 5; line++)
{
PlayerTextDrawShow(playerid,Message[line]);
}
return 1;
}
Re: Player-textdraws -
pors - 24.05.2016
help please
Re: Player-textdraws -
Slawiii - 24.05.2016
where is the line error
Re: Player-textdraws -
pors - 24.05.2016
Quote:
Originally Posted by Slawiii
where is the line error
|
Can you fix this
Re: Player-textdraws -
Slawiii - 24.05.2016
try this
PHP код:
public OnFilterScriptInit()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
for(new line; line<5; line++)
{
format(MessageStr[line], 128, " ");
}
Message[playerid][0] = CreatePlayerTextDraw(300, 100+200, MessageStr[0]);
Message[playerid][1] = CreatePlayerTextDraw(300, 112+200, MessageStr[1]);
Message[playerid][2] = CreatePlayerTextDraw(300, 124+200, MessageStr[2]);
Message[playerid][3] = CreatePlayerTextDraw(300, 136+200, MessageStr[3]);
Message[playerid][4] = CreatePlayerTextDraw(300, 148+200, MessageStr[4]);
for(new line; line<5; line++)
{
PlayerTextDrawLetterSize(playerid,Message[line], 0.249999, 1.199998);
PlayerTextDrawSetShadow(playerid,Message[line], 0);
PlayerTextDrawAlignment(playerid,Message[line], 1);
PlayerTextDrawFont(playerid,Message[line], 1);
PlayerTextDrawSetOutline(playerid,Message[line]);
PlayerTextDrawShow(playerid, Message[line][playerid]);
}
for(new line; line<5; line++)
{
PlayerTextDrawLetterSize(playerid,Message[line], 0.249999, 1.199998);
PlayerTextDrawSetShadow(playerid,Message[line], 0);
PlayerTextDrawAlignment(playerid,Message[line], 1);
PlayerTextDrawTextSize(playerid,Message[line], 640, 480);
PlayerTextDrawFont(playerid,Message[line], 1);
PlayerTextDrawSetOutline(playerid,Message[line], 1);
PlayerTextDrawSetShadow(playerid,Message[line]);
PlayerTextDrawShow(playerid, Message[line][playerid]);
}
}
return 1;
}
public OnFilterScriptExit()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
for(new line; line<5; line++)
{
PlayerTextDrawDestroy(playerid,Message[line][playerid]);
}
}
return 1;
}
Re: Player-textdraws -
Jefff - 24.05.2016
Look where you should create player tds
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
Re: Player-textdraws -
pors - 24.05.2016
Код:
warning 215: expression has no effect
error 001: expected token: ";", but found "["
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
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: Player-textdraws -
Slawiii - 24.05.2016
PLS Tell US the Line where the error
Re: Player-textdraws -
pors - 25.05.2016
Quote:
Originally Posted by Slawiii
PLS Tell US the Line where the error
|
Код:
pwn(19) : warning 215: expression has no effect
pwn(19) : error 001: expected token: ";", but found "["
pwn(19) : error 029: invalid expression, assumed zero
pwn(19) : warning 215: expression has no effect
pwn(19) : error 001: expected token: ";", but found "]"
pwn(19) :fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
pwn(19):
Код:
Message[playerid][0] = CreatePlayerTextDraw(300, 100+200, MessageStr[0]);
Re: Player-textdraws -
pors - 25.05.2016
How do I playertextdraw
https://sampforum.blast.hk/showthread.php?tid=607719