Attach coordinates mess up.
#1

When i come ig, the object coords mess up, but when i make relog, and join 1 more time its everything fine..and it just repeats. Once messed up, once good..
Messed up:

Everything fine:
Reply
#2

No one can help?
Reply
#3

We don't have crystal ball, show your code.
Reply
#4

Sure, up there i save the codes in the folder by OnPlayerUpdate

Код HTML:
				format(var, 32, "Ranecx=%.1f\r\n", PlayerInfo[playerid][pRanecx]);fwrite(hFile, var);
				format(var, 32, "Ranecy=%.1f\r\n", PlayerInfo[playerid][pRanecy]);fwrite(hFile, var);
				format(var, 32, "Ranecz=%.1f\r\n", PlayerInfo[playerid][pRanecz]);fwrite(hFile, var);
				format(var, 32, "Ranecry=%.1f\r\n", PlayerInfo[playerid][pRanecrx]);fwrite(hFile, var);
				format(var, 32, "Ranecrx=%.1f\r\n", PlayerInfo[playerid][pRanecry]);fwrite(hFile, var);
				format(var, 32, "Ranecrz=%.1f\r\n", PlayerInfo[playerid][pRanecrz]);fwrite(hFile, var);
				format(var, 32, "Ranecsy=%.1f\r\n", PlayerInfo[playerid][pRanecsx]);fwrite(hFile, var);
				format(var, 32, "Ranecsx=%.1f\r\n", PlayerInfo[playerid][pRanecsy]);fwrite(hFile, var);
				format(var, 32, "Ranecsz=%.1f\r\n", PlayerInfo[playerid][pRanecsz]);fwrite(hFile, var);
				format(var, 32, "RanecModel=%d\r\n",PlayerInfo[playerid][pRanecModel]);fwrite(hFile, var);
And here, i load it after login.

Код HTML:
if( strcmp( key , "Ranecx" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecx] = floatstr( val ); }
					if( strcmp( key , "Ranecy" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecy] = floatstr( val ); }
					if( strcmp( key , "Ranecz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecz] = floatstr( val ); }
					if( strcmp( key , "Ranecrx" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecrx] = floatstr( val ); }
					if( strcmp( key , "Ranecry" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecry] = floatstr( val ); }
					if( strcmp( key , "Ranecrz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecrz] = floatstr( val ); }
					if( strcmp( key , "Ranecsx" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecsx] = floatstr( val ); }
					if( strcmp( key , "Ranecsy" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecsy] = floatstr( val ); }
					if( strcmp( key , "Ranecsz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecsz] = floatstr( val ); }
			        if( strcmp( key , "RanecModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRanecModel] = strval( val ); }
Reply
#5

Your problem is this: %.1f.

For a better precision, your attach need a float with 6 decimal places.

Try change the 1 to 6 or 8.
Reply
#6

Quote:
Originally Posted by Bruno13
Посмотреть сообщение
Your problem is this: %.1f.

For a better precision, your attach need a float with 6 decimal places.

Try change the 1 to 6 or 8.
Still the same bro.
Reply
#7

Sorry, I read your code again and I saw your fault here:

Код:
format(var, 32, "Ranecx=%.1f\r\n", PlayerInfo[playerid][pRanecx]);fwrite(hFile, var);
format(var, 32, "Ranecy=%.1f\r\n", PlayerInfo[playerid][pRanecy]);fwrite(hFile, var);
format(var, 32, "Ranecz=%.1f\r\n", PlayerInfo[playerid][pRanecz]);fwrite(hFile, var);
format(var, 32, "Ranecry=%.1f\r\n", PlayerInfo[playerid][pRanecrx]);fwrite(hFile, var);
format(var, 32, "Ranecrx=%.1f\r\n", PlayerInfo[playerid][pRanecry]);fwrite(hFile, var);
format(var, 32, "Ranecrz=%.1f\r\n", PlayerInfo[playerid][pRanecrz]);fwrite(hFile, var);
format(var, 32, "Ranecsy=%.1f\r\n", PlayerInfo[playerid][pRanecsx]);fwrite(hFile, var);
format(var, 32, "Ranecsx=%.1f\r\n", PlayerInfo[playerid][pRanecsy]);fwrite(hFile, var);
format(var, 32, "Ranecsz=%.1f\r\n", PlayerInfo[playerid][pRanecsz]);fwrite(hFile, var);
format(var, 32, "RanecModel=%d\r\n",PlayerInfo[playerid][pRanecModel]);fwrite(hFile, var);
Reply
#8

Quote:
Originally Posted by Bruno13
Посмотреть сообщение
Sorry, I read your code again and I saw your fault here:

Код:
format(var, 32, "Ranecx=%.1f\r\n", PlayerInfo[playerid][pRanecx]);fwrite(hFile, var);
format(var, 32, "Ranecy=%.1f\r\n", PlayerInfo[playerid][pRanecy]);fwrite(hFile, var);
format(var, 32, "Ranecz=%.1f\r\n", PlayerInfo[playerid][pRanecz]);fwrite(hFile, var);
format(var, 32, "Ranecry=%.1f\r\n", PlayerInfo[playerid][pRanecrx]);fwrite(hFile, var);
format(var, 32, "Ranecrx=%.1f\r\n", PlayerInfo[playerid][pRanecry]);fwrite(hFile, var);
format(var, 32, "Ranecrz=%.1f\r\n", PlayerInfo[playerid][pRanecrz]);fwrite(hFile, var);
format(var, 32, "Ranecsy=%.1f\r\n", PlayerInfo[playerid][pRanecsx]);fwrite(hFile, var);
format(var, 32, "Ranecsx=%.1f\r\n", PlayerInfo[playerid][pRanecsy]);fwrite(hFile, var);
format(var, 32, "Ranecsz=%.1f\r\n", PlayerInfo[playerid][pRanecsz]);fwrite(hFile, var);
format(var, 32, "RanecModel=%d\r\n",PlayerInfo[playerid][pRanecModel]);fwrite(hFile, var);
Just realized i've messed up every single one of them, thanks !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)