[Ajuda]Erros
#1

pawn Код:
public lol(playerid)
{
    for (new i=0;i<MAX_PLAYERS;i++)
    {
    if(PlayerInfo[playerid][Logged] == 0)
    {
        if(IsPlayerInPlace(i, 987.8362, -1382.3101, 1029.6898, -1340.4981))
        {
            //funcoes
        }
        else
        {
            //funcoes        
        }
        else if(IsPlayerInPlace(i, 1543.105, -1160.76, 1847.332, -979.1639))
        {
            //funcoes
        }
        else
        {
            //funcoes
        }
        else if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))
        {
            //funcoes
        }
        else
        {
            //funcoes
        }
    }
    }
    return 1;
   
}
Код:
(30316) : error 029: invalid expression, assumed zero
(30316) : warning 215: expression has no effect
(30316) : error 001: expected token: ";", but found "if"
(30327) : error 029: invalid expression, assumed zero
(30327) : warning 215: expression has no effect
(30327) : error 001: expected token: ";", but found "if"
as linhas de erros sao as das "else if"

o objetivo dessa callback й verificar se o player esta em alguma das areas.. e executar suas funcoes conforme a area que ele ta..

se alguem poder me ajudar, agradesso =)
Reply
#2

Estб faltando algum ';' em uma linha superior а algum 'if'.
Reply
#3

pawn Код:
public locaisprofs(playerid)
{
    for (new i=0;i<MAX_PLAYERS;i++)
    {
    if(PlayerInfo[playerid][Logged] == 0)
    {
        if(IsPlayerInPlace(i, 987.8362, -1382.3101, 1029.6898, -1340.4981))
        {
            new var0[128];
            format(var0,sizeof(var0),"~b~Area de Carga ~g~(~y~Motoboys~g~) ~g~/~p~p~r~Mercadoria");
            TextDrawSetString(texca[i], var0);
            TextDrawShowForPlayer(i, texca[i]);
        }
        else
        {
            TextDrawHideForPlayer(i, texca[i]);
        }
        else if(IsPlayerInPlace(i, 1543.105, -1160.76, 1847.332, -979.1639))
        {
            new var1[128];
            format(var1,sizeof(var1),"~b~Area de Carga ~g~(~y~Caminhoneiros~g~) ~g~/~r~carregar");
            TextDrawSetString(texca1[i], var1);
            TextDrawShowForPlayer(i, texca1[i]);
        }
        else
        {
            TextDrawHideForPlayer(i, texca1[i]);
        }
        else if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))
        {
            new Celulite[256];
            format(Celulite,sizeof(Celulite),"~b~Area dos ~g~(~y~Mecanicos~g~)");
            TextDrawSetString(texca2[i], Celulite);
            TextDrawShowForPlayer(i, texca2[i]);
        }
        else
        {
            TextDrawHideForPlayer(i, texca2[i]);
        }
    }
    }
    return 1;
   
}
o codigo completo...
Reply
#4

ninguem =(
Reply
#5

Diga quais sгo as linhas, ou seja, poste-as.
Reply
#6

pawn Код:
public locaisprofs(playerid)
{
    for(new i; i != MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[playerid][Logged] == 0)
            {
                if(IsPlayerInPlace(i, 987.8362, -1382.3101, 1029.6898, -1340.4981))
                {
                    new var0[128];
                    format(var0,sizeof(var0),"~b~Area de Carga ~g~(~y~Motoboys~g~) ~g~/~p~p~r~Mercadoria");
                    TextDrawSetString(texca[i], var0);
                    TextDrawShowForPlayer(i, texca[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca[i]);
                }
                else if(IsPlayerInPlace(i, 1543.105, -1160.76, 1847.332, -979.1639))
                {
                    new var1[128];
                    format(var1,sizeof(var1),"~b~Area de Carga ~g~(~y~Caminhoneiros~g~) ~g~/~r~carregar");
                    TextDrawSetString(texca1[i], var1);
                    TextDrawShowForPlayer(i, texca1[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca1[i]);
                }
                else if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))
                {
                    new Celulite[256];
                    format(Celulite,sizeof(Celulite),"~b~Area dos ~g~(~y~Mecanicos~g~)");
                    TextDrawSetString(texca2[i], Celulite);
                    TextDrawShowForPlayer(i, texca2[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca2[i]);
                }
            }
        }
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by [O.z]Caroline
Посмотреть сообщение
pawn Код:
public locaisprofs(playerid)
{
    for(new i; i != MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[playerid][Logged] == 0)
            {
                if(IsPlayerInPlace(i, 987.8362, -1382.3101, 1029.6898, -1340.4981))
                {
                    new var0[128];
                    format(var0,sizeof(var0),"~b~Area de Carga ~g~(~y~Motoboys~g~) ~g~/~p~p~r~Mercadoria");
                    TextDrawSetString(texca[i], var0);
                    TextDrawShowForPlayer(i, texca[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca[i]);
                }
                else if(IsPlayerInPlace(i, 1543.105, -1160.76, 1847.332, -979.1639))
                {
                    new var1[128];
                    format(var1,sizeof(var1),"~b~Area de Carga ~g~(~y~Caminhoneiros~g~) ~g~/~r~carregar");
                    TextDrawSetString(texca1[i], var1);
                    TextDrawShowForPlayer(i, texca1[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca1[i]);
                }
                else if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))
                {
                    new Celulite[256];
                    format(Celulite,sizeof(Celulite),"~b~Area dos ~g~(~y~Mecanicos~g~)");
                    TextDrawSetString(texca2[i], Celulite);
                    TextDrawShowForPlayer(i, texca2[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca2[i]);
                }
            }
        }
    }
    return 1;
}
coloquei e os mesmos erros...
Код:
(30331) : error 029: invalid expression, assumed zero
(30331) : warning 215: expression has no effect
(30331) : error 001: expected token: ";", but found "if"
(30342) : error 029: invalid expression, assumed zero
(30342) : warning 215: expression has no effect
(30342) : error 001: expected token: ";", but found "if"
//30331
else if(IsPlayerInPlace(i, 1543.105, -1160.76, 1847.332, -979.1639))

//30342
else if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))
Reply
#8

pawn Код:
public locaisprofs(playerid)
{
    for(new i; i != MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[playerid][Logged] == 0)
            {
                if(IsPlayerInPlace(i, 987.8362, -1382.3101, 1029.6898, -1340.4981))
                {
                    new var0[128];
                    format(var0,sizeof(var0),"~b~Area de Carga ~g~(~y~Motoboys~g~) ~g~/~p~p~r~Mercadoria");
                    TextDrawSetString(texca[i], var0);
                    TextDrawShowForPlayer(i, texca[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca[i]);
                }
                if(IsPlayerInPlace(i, 1543.105, -1160.76, 1847.332, -979.1639))
                {
                    new var1[128];
                    format(var1,sizeof(var1),"~b~Area de Carga ~g~(~y~Caminhoneiros~g~) ~g~/~r~carregar");
                    TextDrawSetString(texca1[i], var1);
                    TextDrawShowForPlayer(i, texca1[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca1[i]);
                }
                if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))
                {
                    new Celulite[256];
                    format(Celulite,sizeof(Celulite),"~b~Area dos ~g~(~y~Mecanicos~g~)");
                    TextDrawSetString(texca2[i], Celulite);
                    TextDrawShowForPlayer(i, texca2[i]);
                }
                else
                {
                    TextDrawHideForPlayer(i, texca2[i]);
                }
            }
        }
    }
    return 1;
}
Reply
#9

compilou mas...
pawn Код:
if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))                
{                    
    new Celulite[256];                    
    format(Celulite,sizeof(Celulite),"~b~Area dos ~g~(~y~Mecanicos~g~)");                    
    TextDrawSetString(texca2[i], Celulite);                    
    TextDrawShowForPlayer(i, texca2[i]);                
}              
else                
{
    TextDrawHideForPlayer(i, texca2[i]);              
}
essa parte nao esta funcionando, voce sabe o que pode ser?
Reply
#10

Quote:
Originally Posted by THE_FALLEN
Посмотреть сообщение
compilou mas...
pawn Код:
if(IsPlayerInPlace(i, 838.0192, -560.1873, 879.4967, -617.2527))                
{                    
    new Celulite[256];                    
    format(Celulite,sizeof(Celulite),"~b~Area dos ~g~(~y~Mecanicos~g~)");                    
    TextDrawSetString(texca2[i], Celulite);                    
    TextDrawShowForPlayer(i, texca2[i]);                
}              
else                
{
    TextDrawHideForPlayer(i, texca2[i]);              
}
essa parte nao esta funcionando, voce sabe o que pode ser?
Vocк pode nгo estar no local indicado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)