Problem with saving (dini2)
#1

em, where is problem? That doesn't create/.

PHP код:
stock SaveFaction(factionid)
{
    new 
file[60];
        
format(filesizeof(file), FAC_FILEfactionid);
    
dini_IntSet(file"ID"FI[factionid][eID]);
    
dini_Set(file"Name"FI[factionid][eName]);
    
dini_FloatSet(file"Interior_X"FI[factionid][EFPos][0]);
    
dini_FloatSet(file"Interior_Y"FI[factionid][EFPos][1]);
    
dini_FloatSet(file"Interior_Z"FI[factionid][EFPos][2]);
    
dini_FloatSet(file"Outside_X"FI[factionid][OFPos][0]);
    
dini_FloatSet(file"Outside_Y"FI[factionid][OFPos][1]);
    
dini_FloatSet(file"Outside_Z"FI[factionid][OFPos][2]);
    
dini_Set(file"Leader"FI[factionid][eLeader]);
    
dini_Set(file"CoLeader"FI[factionid][eCoLeader]);
    
dini_Set(file"Member_1"FI[factionid][eMember1]);
    
dini_Set(file"Member_2"FI[factionid][eMember2]);
    
dini_Set(file"Member_3"FI[factionid][eMember3]);
    
dini_Set(file"Member_4"FI[factionid][eMember4]);
    
dini_Set(file"Member_5"FI[factionid][eMember5]);
    
dini_Set(file"Member_6"FI[factionid][eMember6]);
    
dini_Set(file"Member_7"FI[factionid][eMember7]);
    
dini_Set(file"Member_8"FI[factionid][eMember8]);
    
dini_Set(file"Member_9"FI[factionid][eMember9]);
    
dini_Set(file"Member_10"FI[factionid][eMember10]);
    
dini_Set(file"Member_11"FI[factionid][eMember11]);
    
dini_Set(file"Member_12"FI[factionid][eMember12]);
    
dini_Set(file"Member_13"FI[factionid][eMember13]);
    
dini_Set(file"Member_14"FI[factionid][eMember14]);
    
dini_Set(file"Member_15"FI[factionid][eMember15]);
    
dini_Set(file"Member_16"FI[factionid][eMember16]);
    
dini_Set(file"Member_17"FI[factionid][eMember17]);
    
dini_Set(file"Member_18"FI[factionid][eMember18]);
    
dini_Set(file"Member_19"FI[factionid][eMember19]);
    
dini_Set(file"Member_20"FI[factionid][eMember20]);
    
dini_IntSet(file"Type"FI[factionid][eType]);
    
dini_IntSet(file"Int"FI[factionid][eInt]);
    
dini_IntSet(file"OutInt"FI[factionid][eOutInt]);
    
dini_IntSet(file"VW"FI[factionid][eVW]);
    
dini_IntSet(file"OutVW"FI[factionid][eOutVW]);
    return 
1;
}
stock CreateFaction(factionidName[64], Float:ExtXFloat:ExtYFloat:ExtZFloat:IntXFloat:IntYFloat:IntZTypeEntIntOutIntEntVWIntVW)
{
    
FI[factionid][eID] = factionid;
    
strmid(FI[factionid][eName], Name0strlen(Name));
    
FI[factionid][EFPos][0] = IntX;
    
FI[factionid][EFPos][1] = IntY;
    
FI[factionid][EFPos][2] = IntZ;
    
FI[factionid][OFPos][0] = ExtX;
    
FI[factionid][OFPos][1] = ExtY;
    
FI[factionid][OFPos][2] = ExtZ;
    
FI[factionid][eType] = Type;
    
FI[factionid][eInt] = EntInt;
    
FI[factionid][eOutInt] = OutInt;
    
FI[factionid][eVW] = EntVW;
    
FI[factionid][eOutVW] = IntVW;
    
FI[factionid][ePickup] = CreatePickup(12391ExtXExtYExtZEntVW);
    
FI[factionid][eLabel] = Create3DTextLabel(Name, -1ExtXExtYExtZ20.0EntVW0);
    
CallLocalFunction("OnFactionCreate""i"factionid);
    return 
1;
}
stock LoadFaction(factionid)
{
    new 
file[60];
    
format(filesizeof(file), FAC_FILEfactionid);
    
FI[factionid][eID] = dini_Int(file"ID");
    
format(FI[factionid][eName], 24dini_Get(file"Name"));
    
FI[factionid][EFPos][0] = dini_Int(file"Interior_X");
    
FI[factionid][EFPos][1] = dini_Int(file"Interior_Y");
    
FI[factionid][EFPos][2] = dini_Int(file"Interior_Z");
    
FI[factionid][OFPos][0] = dini_Int(file"Outside_X");
    
FI[factionid][OFPos][1] = dini_Int(file"Outside_Y");
    
FI[factionid][OFPos][2] = dini_Int(file"Outside_Z");
    
format(FI[factionid][eLeader], 12dini_Get(file"Leader"));
    
format(FI[factionid][eCoLeader], 12dini_Get(file"CoLeader"));
    
format(FI[factionid][eMember1], 12dini_Get(file"Member_1"));
    
format(FI[factionid][eMember2], 12dini_Get(file"Member_2"));
    
format(FI[factionid][eMember3], 12dini_Get(file"Member_3"));
    
format(FI[factionid][eMember4], 12dini_Get(file"Member_4"));
    
format(FI[factionid][eMember5], 12dini_Get(file"Member_5"));
    
format(FI[factionid][eMember6], 12dini_Get(file"Member_6"));
    
format(FI[factionid][eMember7], 12dini_Get(file"Member_7"));
    
format(FI[factionid][eMember8], 12dini_Get(file"Member_8"));
    
format(FI[factionid][eMember9], 12dini_Get(file"Member_9"));
    
format(FI[factionid][eMember10], 12dini_Get(file"Member_10"));
    
format(FI[factionid][eMember11], 12dini_Get(file"Member_11"));
    
format(FI[factionid][eMember12], 12dini_Get(file"Member_12"));
    
format(FI[factionid][eMember13], 12dini_Get(file"Member_13"));
    
format(FI[factionid][eMember14], 12dini_Get(file"Member_14"));
    
format(FI[factionid][eMember15], 12dini_Get(file"Member_15"));
    
format(FI[factionid][eMember16], 12dini_Get(file"Member_16"));
    
format(FI[factionid][eMember17], 12dini_Get(file"Member_17"));
    
format(FI[factionid][eMember18], 12dini_Get(file"Member_18"));
    
format(FI[factionid][eMember19], 12dini_Get(file"Member_19"));
    
format(FI[factionid][eMember20], 12dini_Get(file"Member_20"));
    
FI[factionid][eType] = dini_Int(file"Type");
    
FI[factionid][eInt] = dini_Int(file"Int");
    
FI[factionid][eOutInt] = dini_Int(file"OutInt");
    
FI[factionid][eVW] = dini_Int(file"VW");
    
FI[factionid][eOutVW] = dini_Int(file"OutVW");
    
CreateFaction(FI[factionid][eID],
    
FI[factionid][eName], 
    
FI[factionid][OFPos][0], 
    
FI[factionid][OFPos][1], 
    
FI[factionid][OFPos][2],
    
FI[factionid][EFPos][0],
    
FI[factionid][EFPos][1],FI[factionid][EFPos][2],
    
FI[factionid][Type],
    
FI[factionid][Int],
    
FI[factionid][OutInt],
    
FI[factionid][VW],
    
FI[factionid][OutVW]);
    return 
1;
}
enum E_FAC_INFO
{
    
eID,
    
eName[64],
    
Float:EFPos[3],
    
Float:OFPos[3],
    
eLeader[MAX_PLAYER_NAME],
    
eCoLeader[MAX_PLAYER_NAME],
    
eMember1[MAX_PLAYER_NAME],
    
eMember2[MAX_PLAYER_NAME],
    
eMember3[MAX_PLAYER_NAME],
    
eMember4[MAX_PLAYER_NAME],
    
eMember5[MAX_PLAYER_NAME],
    
eMember6[MAX_PLAYER_NAME],
    
eMember7[MAX_PLAYER_NAME],
    
eMember8[MAX_PLAYER_NAME],
    
eMember9[MAX_PLAYER_NAME],
    
eMember10[MAX_PLAYER_NAME],
    
eMember11[MAX_PLAYER_NAME],
    
eMember12[MAX_PLAYER_NAME],
    
eMember13[MAX_PLAYER_NAME],
    
eMember14[MAX_PLAYER_NAME],
    
eMember15[MAX_PLAYER_NAME],
    
eMember16[MAX_PLAYER_NAME],
    
eMember17[MAX_PLAYER_NAME],
    
eMember18[MAX_PLAYER_NAME],
    
eMember19[MAX_PLAYER_NAME],
    
eMember20[MAX_PLAYER_NAME],
    
eType,
    
eInt,
    
eOutInt,
    
eVW,
    
eOutVW,
    
ePickup,
    
Text3D:eLabel
}; 
Reply
#2

It doesnt create it by itself lol...
dini_Create is what u need. however, just cut the dini and go to sql.
Reply
#3

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
It doesnt create it by itself lol...
dini_Create is what u need. however, just cut the dini and go to sql.
This thing is in both of them, don't bore, just help me.
So when i put dini_Create, it will works huh?
Reply
#4

because file = to nothing

PHP код:
new file[60];
format(filesizeof(file), "path"); //like Stuff.txt 
Reply
#5

Quote:
Originally Posted by Lokii
Посмотреть сообщение
because file = to nothing

PHP код:
new file[60];
format(filesizeof(file), "path"); //like Stuff.txt 
Aaaaaaaq, i forget to write it , but i jave problem with strings saving
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)