cgxlm
cgxlm
CC#
Created by cgxlm on 3/29/2023 in #help
Ambiguity between 2 things idk how to fix
ok what nvm it just dissapeared without me doing anything im so confused
2 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
alright thanks for trying though
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
its this method is where it goes wrong
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
public static void SetNextItem(string[,] HighScores, int ScoreNo)
{
for (int i = HighScores.GetLength(0) - 1; i > ScoreNo; i--)
{
HighScores[i, 0] = HighScores[i - 1, 0];
HighScores[i, 1] = HighScores[i - 1, 1];
}
}
public static void SetNextItem(string[,] HighScores, int ScoreNo)
{
for (int i = HighScores.GetLength(0) - 1; i > ScoreNo; i--)
{
HighScores[i, 0] = HighScores[i - 1, 0];
HighScores[i, 1] = HighScores[i - 1, 1];
}
}
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
its filled with the correct values but it displays it wrong just
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
They all say null
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
by like putting in something like this? MessageBox.Show(Convert.ToString(blackjackScores));
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
hello
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
i cant get it to work no matter what i do ive been trying the past like 2 hours nearly
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
the other methods are up above
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
and thats the code for putting it in the listbox
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
private void Score_Load(object sender, EventArgs e)
{
listBox1.Items.Clear();
listBox1.SelectionMode = SelectionMode.None;
int scoresAmount = Tools.countScores();

// Create a new array for blackjack scores
string[,] blackjackScores = new string[scoresAmount, 2];

// Populate the blackjack scores array
Tools.ScoreArray(blackjackScores);

// Sort the blackjack scores in descending order
blackjackScores = Tools.HighScoreArray(blackjackScores);

// Display the top 5 scores in the list box
for (int i = 0; i < 5 && i < blackjackScores.GetLength(0); i++)
{
string username = blackjackScores[i, 0];
string score = blackjackScores[i, 1];
listBox1.Items.Add($"{username}:\t {score}\n");
}
}
private void Score_Load(object sender, EventArgs e)
{
listBox1.Items.Clear();
listBox1.SelectionMode = SelectionMode.None;
int scoresAmount = Tools.countScores();

// Create a new array for blackjack scores
string[,] blackjackScores = new string[scoresAmount, 2];

// Populate the blackjack scores array
Tools.ScoreArray(blackjackScores);

// Sort the blackjack scores in descending order
blackjackScores = Tools.HighScoreArray(blackjackScores);

// Display the top 5 scores in the list box
for (int i = 0; i < 5 && i < blackjackScores.GetLength(0); i++)
{
string username = blackjackScores[i, 0];
string score = blackjackScores[i, 1];
listBox1.Items.Add($"{username}:\t {score}\n");
}
}
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
the scoreboard for some reason keeps repeating admin: 2 whn it should only be there once
57 replies
CC#
Created by cgxlm on 3/25/2023 in #help
❔ (Unsolved) writing from binary file to listbox
57 replies