SA-MP Forums Archive
Warning ayuda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Warning ayuda (/showthread.php?tid=281562)



Warning ayuda - chucho - 06.09.2011

hola bueno quiera saber por que me sale este Warning

pawn Код:
.pwn(980) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
les pondria la linea de codigo pero no la tengo la 980


Respuesta: Warning ayuda - TheChaoz - 06.09.2011

significa que definiste strtok y nunca lo usaste. borra la funcion strtok


Re: Warning ayuda - dis77urbio - 06.09.2011

Ponle asi :$:

pawn Код:
/*
stock strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[MAX_STRING];
    while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }

    result[index - offset] = EOS;
    if ((index < length) && (string[index] == seperator))
    {
        index++;
    }
    return result;
}
*/



Respuesta: Re: Warning ayuda - Daniel-92 - 06.09.2011

Quote:
Originally Posted by dis77urbio
Посмотреть сообщение
borra esto de tu gm:

pawn Код:
stock strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[MAX_STRING];
    while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }

    result[index - offset] = EOS;
    if ((index < length) && (string[index] == seperator))
    {
        index++;
    }
    return result;
}
no hace falta borrarlo con ponerle "stock" al principio de la funcion el compilador no lo toma en cuenta si se esta usando o no


Re: Respuesta: Re: Warning ayuda - dis77urbio - 06.09.2011

Quote:
Originally Posted by Daniel-92
Посмотреть сообщение
no hace falta borrarlo con ponerle "stock" al principio de la funcion el compilador no lo toma en cuenta si se esta usando o no
Y para que lo quiere si no lo esta usando?


Re: Warning ayuda - Code8976Man - 06.09.2011

Es mejor que busques la funciуn y le pongas un stock delante, nunca se sabe cuando la necesitarбs.


Re: Warning ayuda - dis77urbio - 06.09.2011

Quote:
Originally Posted by Code8976Man
Посмотреть сообщение
Es mejor que busques la funciуn y le pongas un stock delante, nunca se sabe cuando la necesitarбs.
Bueno eso si xD

pawn Код:
/*
stock strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[MAX_STRING];
    while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }

    result[index - offset] = EOS;
    if ((index < length) && (string[index] == seperator))
    {
        index++;
    }
    return result;
}
*/



Re: Warning ayuda - Code8976Man - 06.09.2011

Haber, si le pones el stock, al compilar la funciуn no se compilarб ya que no se utiliza. Si usas zcmd u otro que no sea strtok, quнtala, pero puede que te lo pida tu gamemode ... y para poner /* */ pon stock que es lo mismo. Si pones /* */ para que stock ?


Respuesta: Warning ayuda - chucho - 06.09.2011

es de un fs de garsino es para los pickups de los negocios pero me sale ese warning


Re: Respuesta: Warning ayuda - dis77urbio - 07.09.2011

Quote:
Originally Posted by chucho
Посмотреть сообщение
es de un fs de garsino es para los pickups de los negocios pero me sale ese warning
Si es un fs entonces talvez no este actualizado con los nuevos includes... o no se eso pienso yo :P