10.08.2014, 23:42
Buenas estoy tratando de hacer este sistema pero no puedo terminarlo que ya me salen errores(error 090: public functions may not return arrays (symbol "GetPartOfMsj")) en los return... no entiendo que sera.
SOLUCIONADO, LAS FUNCIONES PUBLICAS NO PUEDEN DEVOLVER ARRAYS
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;
}
}