Resource icon

Apps ferito-liveCarTracker 0.9.5

Login or Register an account to download this content
If and addon track does not have the correct length format on its ui_track.json file, it will not work.

For example, this is the AC silverstone length information: "length": "5901",
Addon track Donnington has: "length": "4.020m", which is pretty wacked as it states is meters not even km

Tracks like Barbagallo has "length": "2.411km", which does not follow the standard, but with an effort the length can properly being retrieved.
 
Special Note
If an addon track does not have the correct length format on its ui_track.json file, the application will not show the correct deltas between the cars.

For example, this is the AC silverstone length information: "length": "5901",
Addon track Donnington has: "length": "4.020m", which is pretty wacked as it states is meters not even km

Tracks like Barbagallo has "length": "2.411km", which does not follow the standard, but with an effort the length can properly being retrieved.
You should be able to strip all letters and other marks from track lengths though. Treat it as a string.strip(".,km") and then int(string) :p
 
problem is some tracks has the length defined in meters while other in kms without specifying which.
If you have 4.4 km that would be a problem indeed.
Maybe check if there is a . or a , in the string, if so, strip those and add trailing zeros. If you need to:
string.strip(" km") #strips all spaces, k's and m's
array = string.split(".") #create an array with 2 keys,
if string.size(array[1]):inlove::
string.format(somethingwithtrailingzeros)
int(str(array[0])+str(array[1])

You should look up the correct commands to format and size, but this is the idea you might want to look into.
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top