Ayuda error!
#1

Reply
#2

El argumento 1 de esas lineas no esta bien puesto (el argumento 1 es el primer dato de la funcion)
Ini save no existe pasa las lineas de error y te ayudamos mejor
Reply
#3

stock LoadDoors()
{
new dStr[128];
new file[128];
new arrCoords[6][64];
for(new idx=1; idx<MAX_PUERTAS; idx++)
{
format(file, sizeof(file), "PuertasIG/%d.ini", idx);
if(fexist(file) && INI_Open(file))
{
DoorInfo[idx][dPickupModel] = INI_ReadInt("PickupModel");
DoorInfo[idx][dCustomInterior] = strval(arrCoords[1]);
DoorInfo[idx][dEnterX] = INI_ReadFloat("EnterX");
DoorInfo[idx][dEnterY] = INI_ReadFloat("EnterY");
DoorInfo[idx][dEnterZ] = INI_ReadFloat("EnterZ");
DoorInfo[idx][dExitX] = INI_ReadFloat("ExitX");
DoorInfo[idx][dExitY] = INI_ReadFloat("ExitY");
DoorInfo[idx][dExitZ] = INI_ReadFloat("ExitZ");
DoorInfo[idx][dInt] = INI_ReadInt("Int");
DoorInfo[idx][dExitVW] = INI_ReadInt("ExitVW");
DoorInfo[idx][dExitInt] = INI_ReadInt("ExitInt");
DoorInfo[idx][dEnterVW] = INI_ReadInt("EnterVW");
DoorInfo[idx][dEnterInt] = INI_ReadInt("EnterInt");

INI_ReadString(DoorInfo[idx][dName],"Name", 600);
format(dStr, sizeof(dStr), "{FFFE6B}Nombre{FFFFFF}: %s\n{FFFE6B}ID{FFFFFF}: %d\n{FFFE6B}[{FFFFFF}Presione {FFFE6B}Y{FFFFFF} Para Entrar{FFFE6B}]",DoorInfo[idx][dName], idx);

DoorInfo[idx][dLabel] = CreateDynamic3DTextLabel(dStr, -1, DoorInfo[idx][dEnterX], DoorInfo[idx][dEnterY], DoorInfo[idx][dEnterZ], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
DoorInfo[idx][dPickup] = CreateDynamicPickup(DoorInfo[idx][dPickupModel], 23, DoorInfo[idx][dEnterX], DoorInfo[idx][dEnterY], DoorInfo[idx][dEnterZ], 0, 0, -1, 70.0);

DoorIDTaken[idx] = 1;

INI_Close();
}
}
return 1;
}

SaveDoors()
{
new file[128];
for(new i= 1; i < MAX_PUERTAS; i++)
{
if(DoorIDTaken[i] == 0) continue;
format(file, sizeof(file), "PuertasIG/%d.ini", i);
if(INI_Open(file))
{
INI_WriteInt("PickupModel",DoorInfo[i][dPickupModel]);
INI_WriteFloat("EnterX",DoorInfo[i][dEnterX]);
INI_WriteFloat("EnterY",DoorInfo[i][dEnterY]);
INI_WriteFloat("EnterZ",DoorInfo[i][dEnterZ]);
INI_WriteFloat("ExitX",DoorInfo[i][dExitX]);
INI_WriteFloat("ExitY",DoorInfo[i][dExitY]);
INI_WriteFloat("ExitZ",DoorInfo[i][dExitZ]);
INI_WriteInt("Int",DoorInfo[i][dInt]);
INI_WriteInt("ExitVW",DoorInfo[i][dExitVW]);
INI_WriteInt("ExitInt",DoorInfo[i][dExitInt]);
INI_WriteInt("EnterVW",DoorInfo[i][dEnterVW]);
INI_WriteInt("EnterInt",DoorInfo[i][dEnterInt]);
INI_WriteString("Name", DoorInfo[i][dName]);
INI_Save();
INI_Close();
}
}
return 1;
}

stock GetAvailableID()
{
for(new i = 1; i<MAX_PUERTAS; i++)
{
if(DoorIDTaken[i] == 0) return i;
}
return -1;
}

stock IsValidPickupModel(modelid) // Credits to creator
{
static modeldat[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128,
-515899393, -134217729, -1, -1, 33554431, -1, -1, -1, -14337, -1, -33,
127, 0, 0, 0, 0, 0, -8388608, -1, -1, -1, -16385, -1, -1, -1, -1, -1,
-1, -1, -33, -1, -771751937, -1, -9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 33554431, -25, -1, -1, -1, -1, -1, -1,
-1073676289, -2147483648, 34079999, 2113536, -4825600, -5, -1, -3145729,
-1, -16777217, -63, -1, -1, -1, -1, -201326593, -1, -1, -1, -1, -1,
-257, -1, 1073741823, -133122, -1, -1, -65, -1, -1, -1, -1, -1, -1,
-2146435073, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1073741823, -64, -1,
-1, -1, -1, -2635777, 134086663, 0, -64, -1, -1, -1, -1, -1, -1, -1,
-536870927, -131069, -1, -1, -1, -1, -1, -1, -1, -1, -16384, -1,
-33554433, -1, -1, -1, -1, -1, -1610612737, 524285, -128, -1,
2080309247, -1, -1, -1114113, -1, -1, -1, 66977343, -524288, -1, -1, -1,
-1, -2031617, -1, 114687, -256, -1, -4097, -1, -4097, -1, -1,
1010827263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32768, -1, -1, -1, -1, -1,
2147483647, -33554434, -1, -1, -49153, -1148191169, 2147483647,
-100781080, -262145, -57, 134217727, -8388608, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1048577, -1, -449, -1017, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1835009, -2049, -1, -1, -1, -1, -1, -1,
-8193, -1, -536870913, -1, -1, -1, -1, -1, -87041, -1, -1, -1, -1, -1,
-1, -209860, -1023, -8388609, -2096897, -1, -1048577, -1, -1, -1, -1,
-1, -1, -897, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1610612737,
-3073, -28673, -1, -1, -1, -1537, -1, -1, -13, -1, -1, -1, -1, -1985,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1056964609, -1, -1, -1,
-1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-236716037, -1, -1, -1, -1, -1, -1, -1, -536870913, 3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -2097153, -2109441, -1, 201326591, -4194304, -1, -1,
-241, -1, -1, -1, -1, -1, -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, -32768, -1, -1, -1, -2, -671096835, -1, -8388609, -66323585, -13,
-1793, -32257, -247809, -1, -1, -513, 16252911, 0, 0, 0, -131072,
33554383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8356095, 0, 0, 0, 0, 0,
0, -256, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-268435449, -1, -1, -2049, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
92274627, -65536, -2097153, -268435457, 591191935, 1, 0, -16777216, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 127
};
if ((modelid >= 0) && ((modelid / 32) < sizeof (modeldat)) && (modeldat[modelid / 32] & (1 << (modelid % 32))))
{
return 1;
}
// EDITED FOR 0.3c, 0.3d & 0.3e OBJECTS
switch (modelid)
{
case 0, 331, 333..339, 341, 318..321, 325, 326, 342..344, 346..353, 355..370, 372,
18632..18645, 18646..18658, 18659..18667, 18668..19299, 19301..19515, 18631:
{
return 1;
}
case 19516..19521: // 0.3x RC2-4 objects
{
return 1;
}
}
return 0;
}
Reply
#4

El problema estб en todos los write.

pawn Код:
SaveDoors()
{
    new file[128];
    for(new i= 1; i < MAX_PUERTAS; i++)
    {
        if(DoorIDTaken[i] == 0) continue;
        format(file, sizeof(file), "PuertasIG/%d.ini", i);
        if(INI_Open(file))
        {
            INI_WriteInt(file, "PickupModel", DoorInfo[i][dPickupModel]);
            INI_WriteFloat(file, "EnterX", DoorInfo[i][dEnterX]);
            INI_WriteFloat(file, "EnterY", DoorInfo[i][dEnterY]);
            INI_WriteFloat(file, "EnterZ", DoorInfo[i][dEnterZ]);
            INI_WriteFloat(file, "ExitX", DoorInfo[i][dExitX]);
            INI_WriteFloat(file, "ExitY", DoorInfo[i][dExitY]);
            INI_WriteFloat(file, "ExitZ", DoorInfo[i][dExitZ]);
            INI_WriteInt(file, "Int", DoorInfo[i][dInt]);
            INI_WriteInt(file, "ExitVW", DoorInfo[i][dExitVW]);
            INI_WriteInt(file, "ExitInt", DoorInfo[i][dExitInt]);
            INI_WriteInt(file, "EnterVW", DoorInfo[i][dEnterVW]);
            INI_WriteInt(file, "EnterInt", DoorInfo[i][dEnterInt]);
            INI_WriteString(file, "Name", DoorInfo[i][dName]);
            INI_Save();
            INI_Close();
        }
    }
    return 1;
}
Te faltу indicar a que fichero hay que escribir los datos.

їEstбs usando YSI o SII? Si estбs usando SII creo que sуlo tenes que actualizar al ъltimo include. Si estбs usando YSI no existe INI_Save creo (eso me hace duda que estбs usando xD)
Reply
#5

Uso YSI
Reply
#6

Que tengo que hacer con lo de indicar fichero?
Reply
#7

Cambiб el cуdigo SaveDoors que tenes por el que te puse en el mensaje anterior, no deberнa darte error.
Reply
#8

Me sigue dando error
Reply
#9

їEn las mismas lineas? Indica cual es la primer linea que te da error (1688 segъn la primer imagen)
Reply
#10

INI_WriteInt(file, "PickupModel", DoorInfo[i][dPickupModel]);
INI_WriteFloat(file, "EnterX", DoorInfo[i][dEnterX]);
INI_WriteFloat(file, "EnterY", DoorInfo[i][dEnterY]);
INI_WriteFloat(file, "EnterZ", DoorInfo[i][dEnterZ]);
INI_WriteFloat(file, "ExitX", DoorInfo[i][dExitX]);
INI_WriteFloat(file, "ExitY", DoorInfo[i][dExitY]);
INI_WriteFloat(file, "ExitZ", DoorInfo[i][dExitZ]);
INI_WriteInt(file, "Int", DoorInfo[i][dInt]);
INI_WriteInt(file, "ExitVW", DoorInfo[i][dExitVW]);
INI_WriteInt(file, "ExitInt", DoorInfo[i][dExitInt]);
INI_WriteInt(file, "EnterVW", DoorInfo[i][dEnterVW]);
INI_WriteInt(file, "EnterInt", DoorInfo[i][dEnterInt]);
INI_WriteString(file, "Name", DoorInfo[i][dName]);

Este es el problema, pero no se la soluciуn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)