0

Can anyone help?

i do not understand what is wrong here, but can someone maybe help me find the issue? FormatException: Unknown string format ' BreakInfinity.BigDouble+BigNumber.FormatBigDouble (BreakInfinity.BigDouble value, System.String format, System.IFormatProvider formatProvider) (at Assets/Scripts/BigDouble.cs:868) BreakInfinity.BigDouble.ToString (System.String format, System.IFormatProvider formatProvider) (at Assets/Scripts/BigDouble.cs:220) System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.String.Format (System.String format, System.Object arg0) (at <695d1cc93cca45069c528c15c9fdd749>:0) UpgradesManager.<UpdateClickUpgradeUI>g__UpdateUI|11_0 (System.Int32 ID) (at Assets/Scripts/UpgradesManager.cs:53) UpgradesManager.UpdateClickUpgradeUI (System.Int32 UpgradeID) (at Assets/Scripts/UpgradesManager.cs:47) UpgradesManager.StartUpgradeManager () (at Assets/Scripts/UpgradesManager.cs:40) Controller.Start () (at Assets/Scripts/Controller.cs:29) why would i get this error?

27th Feb 2022, 10:12 PM
Dominick Harris
Dominick Harris - avatar
8 odpowiedzi
+ 2
Tag the relevant programming language and link the code. The first line hints at a string which is not represented as expected.
27th Feb 2022, 10:32 PM
Lisa
Lisa - avatar
+ 2
In the bottom it hints at line in UpgradesManager.cs and Controller.cs – start by searching there
27th Feb 2022, 10:42 PM
Lisa
Lisa - avatar
+ 2
You can save code on sololearn playground: Go to Code section, click +, select C#, put your code there, sage. In the thread, click +, insert code, sort for My Code Bits, select the code. Maybe somewhere casting to string failed. Have you tried using a debugger? Or printing to console? I can't find the issue right now, perhaps tomorrow.
27th Feb 2022, 11:36 PM
Lisa
Lisa - avatar
0
Thank you for responding! i have tagged the language and as far as linking code im working on that currently
27th Feb 2022, 10:40 PM
Dominick Harris
Dominick Harris - avatar
0
i looked in the controller and the upgradesmanager, i see no issues, i cannot figure why its saying this, how do i link my code up?
27th Feb 2022, 10:59 PM
Dominick Harris
Dominick Harris - avatar
0
public void StartUpgradeManager() { clickUpgradeNames = new[] { "Click Power +1", "Click Power +5", "Click Power +10" }; clickUpgradeBaseCost = new BigDouble[] { 10, 50, 100 }; clickUpgradeCostMult = new BigDouble[] { 1.25, 1.35, 1.55 }; clickUpgradesBasePower = new BigDouble[] { 1, 5, 10 }; for (int i = 0; i < Controller.instance.data.clickUpgradeLevel.Count; i++) { Upgrades upgrade = Instantiate(clickUpgradePrefab, clickUpgradesPanel); upgrade.UpgradeID = i; clickUpgrades.Add(upgrade); } clickUpgradesScroll.normalizedPosition = new Vector2(0, 0); UpdateClickUpgradeUI(); } public void UpdateClickUpgradeUI(int UpgradeID = -1) { var data = Controller.instance.data; if (UpgradeID == -1) for (int i = 0; i < clickUpgrades.Count; i++) UpdateUI(i); else UpdateUI(UpgradeID); void UpdateUI(int ID) { clickUpgrades[ID].LevelText.text = data.clickUpgradeLevel[ID].ToString(); clickUpgrades[ID].CostText.text =
quot;Cost: {clickUpgradeCost(ID):F2} Flasks"; clickUpgrades[ID].NameText.text = clickUpgradeNames[ID]; } } heres the section of upgradesmanager its freaking about
27th Feb 2022, 11:03 PM
Dominick Harris
Dominick Harris - avatar
0
the bigdouble section and the controller section both point to that section in upgrades manager, but claim there is an invalid exception in this area
27th Feb 2022, 11:05 PM
Dominick Harris
Dominick Harris - avatar
0
I figured it out, very small error in my typing, thank you so much for your help and responding!
27th Feb 2022, 11:45 PM
Dominick Harris
Dominick Harris - avatar