Invalid expression, assumed zero
#1

Bueno yo quise poner que te muestre un textdraw mientras esta en esa posiciуn y me tira error en else... les paso el codigo... si me ayudan, les agradeceria mucho

pawn Код:
forward Parado();
public Parado()
{
for(new i = 0;i < MAX_PLAYERS; i++)
{
if(PlayerToPoint(2.0,i,1506.5599,-1746.2032,13.5469))
{
TextDrawShowForPlayer(i,TextdrawGuia[i]);
return 1;
}
}
else // linea de error
{
for(new i = 0;i < MAX_PLAYERS; i++)
{
TextDrawHideForPlayer(i,TextdrawGuia[i]);
return 1;
}
}
return 1;
}
Reply
#2

intenta asi
pawn Код:
forward Parado();
public Parado()
{
for(new i = 0;i < MAX_PLAYERS; i++)
{
if(PlayerToPoint(2.0,i,1506.5599,-1746.2032,13.5469))
{
TextDrawShowForPlayer(i,TextdrawGuia[i]);
}
else // linea de error
{
TextDrawHideForPlayer(i,TextdrawGuia[i]);
}
}
return 1;
}
Reply
#3

pawn Код:
forward Parado();
public Parado()
{
    for(new i, j=GetMaxPlayers(); i<j; i++)
        if(IsPlayerConnected(i))
            if(PlayerToPoint(2.0,i,1506.5599,-1746.2032,13.5469))
                return TextDrawShowForPlayer(i,TextdrawGuia[i]);
            else
                return TextDrawHideForPlayer(i,TextdrawGuia[i]);
    return 1;
}
Reply
#4

La verdad probe con los dos codigos, y los dos compilan bien sin warnings ni errors, pero el textdraw no se ve. Se me ocurre que capas esta mal escrito el TextDraw, este es el codigo:
pawn Код:
TextdrawGuia[playerid] = TextDrawCreate(131.000000, 155.000000, "Pon /Guia para ubicarte en la ciudad");
    TextDrwAlignment(TextdrawGuia[playerid], 2);
    TextDrawBackgroundColor(TextdrawGuia[playerid], 255);
    TextDrawFont(TextdrawGuia[playerid], 1);
    TextDrawLetterSize(TextdrawGuia[playerid], 0.340000, 1.600000);
    TextDrawColor(TextdrawGuia[playerid], 0xFFFFFFAA);
    TextDrawSetOutline(TextdrawGuia[playerid], 0);
    TextDrawSetProportional(TextdrawGuia[playerid], 1);
    TextDrawSetShadow(TextdrawGuia[playerid], 0);
    TextDrawUseBox(TextdrawGuia[playerid], 1);
    TextDrawBoxColor(TextdrawGuia[playerid], 80);
    TextDrawTextSize(TextdrawGuia[playerid], 8.000000, 185.000000);
Muchas gracias por responder.
Reply
#5

Como llamas ese public, con un timer o algo?
Reply
#6

no =S
Reply
#7

Eso pasa aveces, es un bug de samp supongo cuando usas muchos textdraws se bugean o no aparecen a mi me pasa xd
Reply
#8

Que raro, solo tengo los textdraws del turorial y capas uno q otro q venia en el gm, pero no son muchos, de todas formas muchas gracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)