Big numbers
So I am making an Idle Game where I need to have huge numbers. But if I want to access it through PlayerPrefs.Get... I can only use a string an int or a float. Any idea how you store a big number in one (or more ints/floats)?
Don't get the problem/question. isn't "huge numbers" still an int? for instance, I save my score to PlayerPrefs and it's a big/huge number.
public int scoreValue;
public int savedScoreValue;
PlayerPrefs.SetInt ("score" ,scoreValue);
PlayerPrefs.GetInt ("score" );
savedScoreValue = PlayerPrefs.GetInt ("score" );//this just a test to see I saved the score and retrieved it. Of course this needs to be fleshed out to actually work. like keydown Z to save and keydown X to display saved score
Answer by shadowpuppet · May 05, 2020 at 01:33 PM
Hmmm, actually I see what you mean. I can only have an int go as high as 9 places - hundreds of millions, 999,999,999. a tenth digit gives me the error "Constant value `9999999991' cannot be converted to a 'int' . Curious as to what on earth you are doing that requires a number in the billions ? Also curious now about WTF so I tried looking it up. This may explain - or not. https://answers.unity.com/questions/1217933/how-do-variables-vs-constants-work-in-compiled-cod.html
Answer by KevinDasPikachu · May 05, 2020 at 03:12 PM
As I said I am making an Idle game so I need numbers as high as like 1aa or even higher. Look at "Idle Miner Tycoon" (very popular on Google Play). They are using numbers as huge as this idleminertycoonfandom.com/wiki/Currency_Display . Also the post you've linked doesn't help me. @shadowpuppet
Your answer
Follow this Question
Related Questions
How do i change object localScale axis x but only to the right side ? 0 Answers
how to ask if something is not true for an amount of time 2 Answers
How to Save the Current that what load from playerprefs 0 Answers
Set the username with an inputfield ? 3 Answers
I want my script to wait 2 seconds before continue in a condition, in update, using C# 2 Answers