error en return
#2

Prueba asн:
pawn Код:
function GetPartOfMsj(playerid)
{
    new f[20];
    new pc  = strval(Informacion[playerid][Celular]);
    if(Celu[pc][M1] != -1)
    {
        strmid(f, Celu[pc][Msj1], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M2] != -1)
    {
        strmid(f, Celu[pc][Msj2], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M3] != -1)
    {
        strmid(f, Celu[pc][Msj3], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M4] != -1)
    {
        strmid(f, Celu[pc][Msj4], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M5] != -1)
    {
        strmid(f, Celu[pc][Msj5], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M6] != -1)
    {
        strmid(f, Celu[pc][Msj6], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M7] != -1)
    {
        strmid(f, Celu[pc][Msj7], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M8] != -1)
    {
        strmid(f, Celu[pc][Msj8], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M9] != -1)
    {
        strmid(f, Celu[pc][Msj9], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
    if(Celu[pc][M10] != -1)
    {
        strmid(f, Celu[pc][Msj10], 0, 10, sizeof(f));
        new string[20];
        format(string, sizeof(string), "%s...", f);
        return string;
    }
return -1;
}
Si el error era algo como 'you should return a value'
Para que luego digan que no somos adivinos, publica tus errores al preguntar la duda.
Reply


Messages In This Thread
error en return - by Alienwar3 - 10.08.2014, 23:42
Respuesta: error en return - by adri1 - 10.08.2014, 23:48
Respuesta: error en return - by Alienwar3 - 10.08.2014, 23:52
Respuesta: error en return - by DesingMyCry - 10.08.2014, 23:52
Respuesta: error en return - by DesingMyCry - 14.08.2014, 22:25

Forum Jump:


Users browsing this thread: 1 Guest(s)