Player-textdraws
#1

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;
}
Reply
#2

help please
Reply
#3

where is the line error
Reply
#4

Quote:
Originally Posted by Slawiii
Посмотреть сообщение
where is the line error
Can you fix this
Reply
#5

try this

PHP код:
public OnFilterScriptInit()
{
        for(new 
playeridplayerid MAX_PLAYERSplayerid++)
        {
            for(new 
lineline<5line++)
            {
                
format(MessageStr[line], 128" ");
            }


            
Message[playerid][0] = CreatePlayerTextDraw(300100+200MessageStr[0]);
            
Message[playerid][1] = CreatePlayerTextDraw(300112+200MessageStr[1]);
            
Message[playerid][2] = CreatePlayerTextDraw(300124+200MessageStr[2]);
               
Message[playerid][3] = CreatePlayerTextDraw(300136+200MessageStr[3]);
            
Message[playerid][4] = CreatePlayerTextDraw(300148+200MessageStr[4]);
            for(new 
lineline<5line++)
             {
                   
PlayerTextDrawLetterSize(playerid,Message[line], 0.2499991.199998);
                
PlayerTextDrawSetShadow(playerid,Message[line], 0);
                
PlayerTextDrawAlignment(playerid,Message[line], 1);
                
PlayerTextDrawFont(playerid,Message[line], 1);
                
PlayerTextDrawSetOutline(playerid,Message[line]);
                 
PlayerTextDrawShow(playeridMessage[line][playerid]);
            }
            for(new 
lineline<5line++)
            {
                
PlayerTextDrawLetterSize(playerid,Message[line], 0.2499991.199998);
                
PlayerTextDrawSetShadow(playerid,Message[line], 0);
                
PlayerTextDrawAlignment(playerid,Message[line], 1);
                
PlayerTextDrawTextSize(playerid,Message[line], 640480);
                
PlayerTextDrawFont(playerid,Message[line], 1);
                
PlayerTextDrawSetOutline(playerid,Message[line], 1);
                
PlayerTextDrawSetShadow(playerid,Message[line]);
                
PlayerTextDrawShow(playeridMessage[line][playerid]);
            }
        }
        return 
1;
}

public 
OnFilterScriptExit()
{
    for(new 
playeridplayerid MAX_PLAYERSplayerid++)
    {
        for(new 
lineline<5line++)
        {
             
PlayerTextDrawDestroy(playerid,Message[line][playerid]);
        }
     }
      return 
1;

Reply
#6

Look where you should create player tds
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
Reply
#7

Код:
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.
Reply
#8

PLS Tell US the Line where the error
Reply
#9

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]);
Reply
#10

How do I playertextdraw

https://sampforum.blast.hk/showthread.php?tid=607719
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)