SA-MP Forums Archive
[DUDA/AYUDA]Ayuda Con Estos 2 Errores: - 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: [DUDA/AYUDA]Ayuda Con Estos 2 Errores: (/showthread.php?tid=487963)



[DUDA/AYUDA]Ayuda Con Estos 2 Errores: - yesid001 - 16.01.2014

Buenas porfavor me ayuaran a solucionar estos 2 errores:
D:\--------\gamemodes\-------.pwn(14935) : error 021: symbol already defined: "strtok"
D:\--------\gamemodes\-------.pwn(14946) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Y Aqui Las Lineas De Los Errores:
pawn Код:
strtok(const string[], &index,seperator=' ')
{ /* Linea 14935 xD */
    new length = strlen(string);
    new offset = index;
    new result[NOMOVE_STR];
    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++;/* Linea 14946 */
    return result;
}
Porfavor Espero Me Puedan Ayudar, mi Server anda Cerrado Por Esto.


Respuesta: [DUDA/AYUDA]Ayuda Con Estos 2 Errores: - Swedky - 16.01.2014

pawn Код:
strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[NOMOVE_STR];
    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;
}
Cбmbialo asн:

pawn Код:
//...
O sea, sуlo debes borrar toda la funciуn.


Respuesta: [DUDA/AYUDA]Ayuda Con Estos 2 Errores: - yesid001 - 16.01.2014

Mil Gracias, Ya No Me Salen Esos 2 Errores!