youtubebin
youtubebin
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
elem is also a string
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
(righ is an string array)
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
I simply can't find it
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
foreach (string molecule in righ)
{
int index = molecule.IndexOf(elem);
if (index == -1) buildArr.Add(-1);
else
{
index += elem.Length;
Match numberAfterElement = Regex.Match(molecule.Substring(index), @"^\d+");
if (numberAfterElement == null || !numberAfterElement.Success)
{
buildArr.Add(-1);
}
else
{
buildArr.Add(-1 * Int32.Parse(numberAfterElement.Value));
string test = "";
foreach (var z in buildArr) test += $"{z}, ";
Debug.Log(test);
}
}
}
rrefArray.Add(buildArr);
foreach (string molecule in righ)
{
int index = molecule.IndexOf(elem);
if (index == -1) buildArr.Add(-1);
else
{
index += elem.Length;
Match numberAfterElement = Regex.Match(molecule.Substring(index), @"^\d+");
if (numberAfterElement == null || !numberAfterElement.Success)
{
buildArr.Add(-1);
}
else
{
buildArr.Add(-1 * Int32.Parse(numberAfterElement.Value));
string test = "";
foreach (var z in buildArr) test += $"{z}, ";
Debug.Log(test);
}
}
}
rrefArray.Add(buildArr);
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
I believe the issue lies somewhere here:
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
it gives me [ [1, 0, -1, -2], [0, 2, -1, -1], [0, 4, -1, -3] ],
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
instead some numbers are wrong
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
it *should( give me: [ [ 1, 0, 0, -2 ], [ 0, 2, -1, 0 ], [ 0, 4, 0, -3 ] ]
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
something's wrong
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
but uh
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
I am working on it
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
Well
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
key word: many many months ago
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
Fair enough
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
Any ideas?
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
So...
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
@JamesK.Polk
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
Hello again
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
Goodnight
61 replies
CC#
Created by youtubebin on 3/7/2023 in #help
❔ Need help making a chemical equation balancer in C#
ok, seriously, I'm heading off to sleep
61 replies