Logo
Username:
Password: Forgot?
Register
1
 
Integer to Roman, I know it's not a game, but I think this script could come in handy.
Avatar
Kitty Kat
Posts: 170
Status: Offline
Group: Member
Member: #56
Quote
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: Gatete, Aug 6th, 2016 @ 1:43 am
^ Top
Avatar
Never change your avatar
Posts: 2778
Status: Offline
Group: Admin
Member: #1
Quote
This could be useful for something - for example, a puzzle that uses Roman numerals.
Course clear! You got a card.
^ Top
Avatar
Posts: 1390
Status: Offline
Group: Member
Member: #52
Quote
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.

^ Top
-/+
Users Viewing This Topic
1
 
Lithosphere skin 1.0.0 © 2009-10 Matt