02.10.2016, 17:44
(
Последний раз редактировалось GoldenLion; 02.10.2016 в 18:24.
)
Hi, I'm trying to update my filterscript right now by saving the weapon positions. The problem is that the string I format stays empty.
This is the code:
This is what it prints:
What am I doing wrong here?
This is the code:
Код:
SaveWeaponInfo(playerid)
{
new INI:File = INI_Open(WeaponInfoFile(playerid)), string[68], weapon[2];
for (new i = 22; i <= 38; i++)
{
format(string, sizeof(string), "%.5f | %.5f | %.5f | %.5f | %.5f | %.5f | %d | %d", WeaponInfo[playerid][i][Position][0], WeaponInfo[playerid][i][Position][1], WeaponInfo[playerid][i][Position][2], WeaponInfo[playerid][i][Position][3], WeaponInfo[playerid][i][Position][4], WeaponInfo[playerid][i][Position][5], WeaponInfo[playerid][i][Bone], WeaponInfo[playerid][i][Hidden]);
valstr(weapon, i);
INI_WriteString(File, weapon, string);
printf("%s", string);
printf("%s", weapon);
}
INI_Close(File);
}
Код:
[20:36:21] [20:36:21] 22 [20:36:21] [20:36:21] 23 [20:36:21] [20:36:21] 24 [20:36:21] [20:36:21] 25 [20:36:21] [20:36:21] 26 [20:36:21] [20:36:21] 27 [20:36:21] [20:36:21] 28 [20:36:21] [20:36:21] 29 [20:36:21] [20:36:21] 30 [20:36:21] [20:36:21] 31 [20:36:21] [20:36:21] 32 [20:36:21] [20:36:21] 33 [20:36:21] [20:36:21] 34 [20:36:21] [20:36:21] 35 [20:36:21] [20:36:21] 36 [20:36:21] [20:36:21] 37 [20:36:21] [20:36:21] 38


