generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why is this?

Previous Thread :: Next Thread 
killerbot29003 is online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
18 Aug 2016 12:51 PM
print(5e18 % 7)

In lua's official site, it outputs 5.
But in Roblox, it outputs 0?
Is there a fix to this (maybe http service)?


This siggy is copyrighted ©
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
18 Aug 2016 01:03 PM
You probably didn't notice that roblox uses Lua 5.1, not 5.3.
Report Abuse
killerbot29003 is online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
18 Aug 2016 01:03 PM
i noticed it before i made this thread
do those versions really matter



This siggy is copyrighted ©
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
18 Aug 2016 01:05 PM
In Lua 5.1 all numbers are doubles, in Lua 5.3 there are real integers as a number sub-type.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Aug 2016 01:11 PM
Use fmod

local num = 5e18

print(math.fmod(num,7))

>> 5


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image