The Negative One
The Negative One
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
lol
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
Without full context this foreach loop should work right
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
god you should never code while asleep lol
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
I have been working on every solution under the sun since 430 this morning never once did I see this as a valid answer lol
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
if it doese im going to pull my hair out lol
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
You know I thought about that but thew it out because Would that work under a foreach loop headder
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
Yes I just dont know how to do that yet hense why am here lol
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
That I know its when the game loads it throws the error because its loading both the current index 0 and the last index 0-1 aka -1 at the same time
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
So i need to subtract one at one point (pun intended lol)
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
Also The end goal is to have a set of values stored in the previous index so Im trying to find a way to hold index 0 in memory while having the game work on index 1 etc
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
so Im just trying to learn to bound a list that is dynamicaly created
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
I can run the game just fine with that code up there the only issue comes is when I try to activate the Debug Menu and the debugger kills the program and says Index Out of Bounds
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
thats another cog in this machine its not c# thats having the issue it the game engine
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
Also all code I have given you is valid and will comple it only dies on how its called
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
Because I have all of the gaps and I dont know whats needed or not to get to my answer so were at a catch 22
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
Im going to just close this one as I had a brain fart. Noting that because I have all of the code and info its easy for me to refrance this but nigh inposible for me to get thrid pary help on. Thanks for the attmpets though
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
public SectionStats[] SectionStatsArray;

public FiveFretSectionTracker(List<Section> sections, InstrumentDifficulty<GuitarNote> difficulty)
{

SectionStatsArray = new SectionStats[sections.Count];

for (int i = 0; i < sections.Count; i++)
{
var section = sections[i];
var sectionStats = new SectionStats();

foreach (var note in difficulty.Notes)
{
if (note.Tick >= section.Tick && note.Tick < section.TickEnd)
{
sectionStats.TotalSectionNotesStats.CountNotesInSong(note);

}
}
//sectionStats.sectionName = section.Name;
//sectionStats.SectionIndex = i++;
SectionStatsArray[i] = sectionStats;

}
}
}
public SectionStats[] SectionStatsArray;

public FiveFretSectionTracker(List<Section> sections, InstrumentDifficulty<GuitarNote> difficulty)
{

SectionStatsArray = new SectionStats[sections.Count];

for (int i = 0; i < sections.Count; i++)
{
var section = sections[i];
var sectionStats = new SectionStats();

foreach (var note in difficulty.Notes)
{
if (note.Tick >= section.Tick && note.Tick < section.TickEnd)
{
sectionStats.TotalSectionNotesStats.CountNotesInSong(note);

}
}
//sectionStats.sectionName = section.Name;
//sectionStats.SectionIndex = i++;
SectionStatsArray[i] = sectionStats;

}
}
}
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
these are the new index variable these work but wil throw IOB when compiled because as my partner pointed out the first index is 0 so 0-1 = -1 (IOB) and its the same for the last index +1 -1 equals list (IOB) so im trying to just get the indexs store thing in a bounded var and use them for this function
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
int RealCurrentSectionIndex = Chart.Sections.GetIndexOfPrevious(_songRunner.SongTime);
int RealNextSectionIndex = Chart.Sections.GetIndexOfNext(_songRunner.SongTime);
int RealLastSectionIndex = RealCurrentSectionIndex - 1;
int RealCurrentSectionIndex = Chart.Sections.GetIndexOfPrevious(_songRunner.SongTime);
int RealNextSectionIndex = Chart.Sections.GetIndexOfNext(_songRunner.SongTime);
int RealLastSectionIndex = RealCurrentSectionIndex - 1;
52 replies
CC#
Created by The Negative One on 1/15/2025 in #help
Convert List to index to be used in an array
1. When looking at the actual vars Im trying to bound it on either side
52 replies