Turbesz Posted July 5, 2021 Posted July 5, 2021 I use "onClientTransferBoxProgressChange" in my script, and i don't know, how to convert the totalSize argument (bytes) to megabytes. I tried this way without success: addEventHandler("onClientTransferBoxProgressChange", root, function(downloadedSize, totalSize) megabytes = math.floor(totalSize / 1024) end) anyone can help me?
SpecT Posted July 5, 2021 Posted July 5, 2021 (edited) Hey, You could simply just search on google for the formula to convert bytes to megabytes. Formula: megabytes = bytes / 1024 / 1024 So in your case: megabytes = math.floor(totalSize / 1024 / 1024) Edited July 5, 2021 by SpecT 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now