AYUDA CON VARIABLES Y DINI :s - 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: AYUDA CON VARIABLES Y DINI :s (
/showthread.php?tid=444044)
AYUDA CON VARIABLES Y DINI :s -
xDarkuzSx - 14.06.2013
Me voy al grano, ERRORES:
Код:
filterscripts\RealWeather.pwn(67) : error 006: must be assigned to an array
filterscripts\RealWeather.pwn(68) : error 006: must be assigned to an array
2 Errors.
Lineas:
pawn Код:
// variables globales
new RSW_Weather[1];
new RSW_Time[1];
//---------
Linea: 67 RSW_Weather[0] = RSW_Get(data,"Weather");
Linea: 68 RSW_Time[0] = RSW_Get(data,"Time");
La funcion RSW_Get es igual a la de Dini_Get, solo que esta es por string y no por archivo.
la dejo de todas formas:
pawn Код:
stock RSW_Get(string[],key[]) {
new tmpres[MAX_STRING];
new key_length = strlen(key);
if (key_length==0 || key_length+2>MAX_STRING) return tmpres;
while (strlen(string))
{
if (tmpres[key_length]=='='&& !strcmp(tmpres, key, true, key_length))
{
/* We've got what we need */
RSW_StripNewLine(tmpres);
strmid(tmpres, tmpres, key_length + 1, strlen(tmpres), MAX_STRING);
return tmpres;
}
}
return tmpres;
}
PD: la funcion RSW_StripNewLine es igual a la de dini_StripNewLine.
-- Quiziera saber como solucionar los errores, Gracias :P --
Respuesta: AYUDA CON VARIABLES Y DINI :s -
DesingMyCry - 14.06.2013
Arrays de 1 celda? cual es la razуn... ese es el problema. El mнnimo es 2 celdas por variable array.
Respuesta: AYUDA CON VARIABLES Y DINI :s -
xDarkuzSx - 15.06.2013
mm deja me rendi y deje nada mбs el weather, despues veo como le hago xD, Ya publiquй la beta 1 por si te intereza :P
Respuesta: AYUDA CON VARIABLES Y DINI :s -
Zume - 16.06.2013
Prueba poniendo el 1 del define de RSW_Time y RSW_Weather a 0 porque creo que asн te quedan dos espacios, el 0 y el 1 y puede que uses solo uno, o uses mбs en alguna otra parte del script