please help with y_ini errors!
#1

pawn Код:
INI_WriteInt(File, "pt%dModelID=%d", v,  PlayerToyInfo[playerid][v][ptModelID]);
Didnt work.. & Someone told me i should format the stuff before saving it. because i had errors.

So i tried:
pawn Код:
new string1[128], string2[128], string3[128], string4[128], string5[128], string6[128], string7[128], string8[128], string9[128], string10[128], string11[128];
format(string1, sizeof(string1), "pt%dModelID=%d", v, PlayerToyInfo[playerid][v][ptModelID]);
format(string2, sizeof(string2), "pt%dBone=%d", v, PlayerToyInfo[playerid][v][ptBone]);
format(string3, sizeof(string3), "pt%dPosX=%.5f", v, PlayerToyInfo[playerid][v][ptPosX]);
format(string4, sizeof(string4), "pt%dPosY=%.5f", v, PlayerToyInfo[playerid][v][ptPosY]);
format(string5, sizeof(string5), "pt%dPosZ=%.5f", v, PlayerToyInfo[playerid][v][ptPosZ]);
format(string6, sizeof(string6), "pt%dRotX=%.5f", v, PlayerToyInfo[playerid][v][ptRotX]);
format(string7, sizeof(string7), "pt%dRotY=%.5f", v, PlayerToyInfo[playerid][v][ptRotY]);
format(string8, sizeof(string8), "pt%dRotZ=%.5f", v, PlayerToyInfo[playerid][v][ptRotZ]);
format(string9, sizeof(string9), "pt%dScaleX=%.5f", v, PlayerToyInfo[playerid][v][ptScaleX]);
format(string10, sizeof(string10), "pt%dScaleY=%.5f", v, PlayerToyInfo[playerid][v][ptScaleY]);
format(string11, sizeof(string11), "pt%dScaleZ=%.5f", v, PlayerToyInfo[playerid][v][ptScaleZ]);

INI_WriteInt(File, "%d", string1);
INI_WriteFloat(File, "%.5f", string2);
INI_WriteFloat(File, "%.5f", string3);
INI_WriteFloat(File, "%.5f", string4);
INI_WriteFloat(File, "%.5f", string5);
INI_WriteFloat(File, "%.5f", string6);
INI_WriteFloat(File, "%.5f", string7);
INI_WriteFloat(File, "%.5f", string8);
INI_WriteFloat(File, "%.5f", string9);
INI_WriteFloat(File, "%.5f", string10);
INI_WriteFloat(File, "%.5f", string11);
Gives me an error for each INI_Write thing:
pawn Код:
error 035: argument type mismatch (argument 3)
How should i save this code with y_ini without errors? please help..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)