10.08.2014, 23:48
Prueba asн:
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.
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;
}
Para que luego digan que no somos adivinos, publica tus errores al preguntar la duda.