Forgot?

Register
1 ·
Integer to Roman, I know it's not a game, but I think this script could come in handy.
That darn explosive green cat :3
Posts: 171
Status: Offline
Group: Member
Member: #56
So I was browsing the web for a way to convert a integer into a roman number. Surprisingly, there was not any script for GML to do said thing, I only found scripts for JavaScript i/or C#


Said code can be found here
http://stackoverflow.com/questions/12967896/converting-integers-to-roman-numerals-java

So I tried to port one from JavaScript into GML



Here's the code
http://pastebin.com/DWnRSAgZ


Obligatory GIF showing how it works.


NOTE: Take in mind that this will only work with a number between 1 and 3999

---
Edited by: Gate, Aug 6th, 2016 @ 1:43 am
Never change your avatar
Posts: 3180
Status: Offline
Group: Admin
Member: #1
This could be useful for something - for example, a puzzle that uses Roman numerals.
Course clear! You got a card.
Posts: 1637
Status: Offline
Group: Member
Member: #52
401 is CDI?
Sheesh, you would think with it being that high Philips wouldn't have butchered Nintendo's franchises so bad.

Bad jokes aside.
This is actually really cool. I can see this being handy.

-/+
Users Viewing This Topic
1 ·