Saving weapon info
#1

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:
Код:
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);
}
This is what it prints:
Код:
[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
What am I doing wrong here?
Reply


Messages In This Thread
Saving weapon info - by GoldenLion - 02.10.2016, 17:44
Re: Saving weapon info - by AMouldyLemon - 02.10.2016, 18:28
Re: Saving weapon info - by GoldenLion - 02.10.2016, 19:09
Re: Saving weapon info - by AMouldyLemon - 02.10.2016, 19:16
Re: Saving weapon info - by GoldenLion - 02.10.2016, 19:22
Re: Saving weapon info - by GoldenLion - 03.10.2016, 12:55
Re: Saving weapon info - by GoldenLion - 04.10.2016, 12:44

Forum Jump:


Users browsing this thread: 1 Guest(s)