View Issue Details

IDProjectCategoryView StatusLast Update
0007757Multi Theft Auto : San AndreasServerpublic2013-08-14 10:19
ReporterJusonexAssigned ToJusonex 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.4Fixed in Version1.4 
Summary0007757: setAccountData clips the digits after the decimal point
Description

setAccountData(account, "abc", 0.123)
-->
getAccountData(account, "abc") returns only 0.

https://code.google.com/p/mtasa-blue/source/browse/trunk/MTA10_Server/mods/deathmatch/logic/lua/CLuaArgument.cpp#433
MTA converts the floating point variable to an integer there (probably to save memory).

A fix would be simple, but might a fix break some scripts?
On the other hand a fix of this issue would fix some scripts à la DayZ which uses accountdatas to save the position of players, vehicles and so on.

Steps To Reproduce

See description

TagsNo tags attached.

Activities

kakaksk

2013-08-08 14:27

viewer   ~~0019096

Oh, so thats why some players appear behind the walls on login.

kakaksk

2013-08-12 13:19

viewer   ~~0019123

try multiplying the postion by 1000 when saving and dividing by 1000 when loading?

Jusonex

2013-08-12 13:21

administrator   ~~0019124

Either that or using tostring is a workaround as well.

Jusonex

2013-08-13 16:25

administrator   ~~0019138

Fixed in https://code.google.com/p/mtasa-blue/source/detail?r=5713

Issue History

Date Modified Username Field Change