FastLED July 4th Red/White/Blue Scrolling Help - Why is this code not working?

#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 296

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 9

// Define the array of leds
CRGB leds[NUM_LEDS];
int x;
int temp;

void setup() {
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
pinMode(5, INPUT_PULLUP);
// FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.addLeds<WS2813, DATA_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {
while (digitalRead(2) == LOW && digitalRead(3) == LOW && digitalRead(4) == LOW && digitalRead(5) == LOW)
{
// try scrolling flag for 4th of july (used to be blue) #15
// setup initial color layout first
for (int i = 0; i <= 23; i++) { //0-23 // red
leds[i]=0xFF0000;
}
for (int i = 24; i <= 32; i++) { //24-32 // blank - dont want colors overlapping too much
leds[i]=0x000000;
}
for (int i = 33; i <= 56; i++) { //33-56 // white
leds[i]=0x66664D;
}
for (int i = 57; i <= 65; i++) { //57-65 // blank
leds[i]=0x000000;
}
for (int i = 66; i <= 89; i++) { //0-294 // blue
leds[i]=0x0000F5;
}
for (int i = 90; i <= 98; i++) { //0-294 // blank
leds[i]=0x000000;
}
for (int i = 99; i <= 122; i++) { //0-23 // red
leds[i]=0xFF0000;
}
for (int i = 123; i <= 131; i++) { //24-32 // blank
leds[i]=0x000000;
}
for (int i = 132; i <= 155; i++) { //33-56 // white
leds[i]=0x66664D;
}
for (int i = 156; i <= 164; i++) { //57-65 // blank
leds[i]=0x000000;
}
for (int i = 165; i <= 188; i++) { //0-294 // blue
leds[i]=0x0000F5;
}
for (int i = 189; i <= 197; i++) { //0-294 // blank
leds[i]=0x000000;
}
for (int i = 198; i <= 221; i++) { //0-23 // red
leds[i]=0xFF0000;
}
for (int i = 222; i <= 230; i++) { //24-32 // blank
leds[i]=0x000000;
}
for (int i = 231; i <= 254; i++) { //33-56 // white
leds[i]=0x66664D;
}
for (int i = 255; i <= 263; i++) { //57-65 // blank
leds[i]=0x000000;
}
for (int i = 264; i <= 287; i++) { //0-294 // blue
leds[i]=0x0000F5;
}
for (int i = 288; i <= 295; i++) { //0-294 // blank
leds[i]=0x000000;
}
while (true) //move continuously
{
FastLED.show(); //display
delay(34); //34ms wait for each spot should give good speed across front porch
//move each color one spot over
x=leds[295];
for (int i = 295; i >= 1; i--) {
temp = leds[i-1];
leds[i] = temp;
}
leds[0]=x;
}
//other input color selections loops not shown as they work fine when chosen
}
I currently get all blank LEDs when I ground all 4 of my color selection (input) wires to pick this one. Thus I have other selections not shown here that work well so I know my hardware is good and my portion of code that selects which color is good....just having trouble within this routine. See anything obvious???....i'm a novice to coding.

Thanks,
Brian

Please read the how to get the best of the forum post to see how to post code. You can go back and edit your first post to include the code in code tags. Use the IDE autoformat tool (ctrl-t or Tools, Auto Format) to indent the code for readability before posting.

Maybe insert some serial prints to see what is actually being written to the leds array.

while (digitalRead(2) == LOW && digitalRead(3) == LOW && digitalRead(4) == LOW && digitalRead(5) == LOW)
{

This means that the code within the next following braces will only be executed when all those pins are 'LOW', now since you've defined them as INPUT_PULLUP, i am assuming that you use the button to connect them to GND when pressed, so nothing will happen unless all buttons are pressed when that statement is encountered.
You then fill the array with data, and then :

while (true) //move continuously
{

So the first condition is only encountered once.
And then you scroll the pattern.

x=leds[295];
for (int i = 295; i >= 1; i--) {
temp = leds[i-1];
leds[i] = temp;
}
leds[0]=x;
}

I think that should work

Well other than keeping us in the dark about how those do work, what is the point ?
I don't see how you can properly select / and change your selection when you have an infinite loop in your sketch, or do you 'reset' the unit ?
As for assigning colors by filling up the leds[] i think you should really always check NUM_LEDS to make sure you never write beyond the size of the array.

Code seems to be ok. How are you powering the LEDs? Only thing I can think of is that you may be running more LEDs in this pattern than the others and the power supply is insufficient, or there is a problem with your selector switch wiring so you never get all four switches grounded at the same time.

Correct, to run this color selection, I ground all 4 pins and as previously stated I know those pins work because my other color selections 0-14 work. I also know my LEDs work are working hardware because those other selections, including white, work all the time. (Yes i realize to escape this one, it must be powered down)(I have them broken into 3 strands with 3 PSs feeding both ends of +/- each.) The only thing I could think of now....is my 34ms too fast for the FASTLED library??? I thought the code looked clean too, just kind of odd nothing is showing up.

Only thing I see is that temp and x should be a CRGB ( or unsigned long), not an int. You can eliminate temp entirely and just set leds [i] = leds [i-1], but x needs to be changed.

On most Arduinos that will be a 16-bit integer, only able to hold 2/3 of your color. You are going to lose the Red data. Try:
unsigned long x;

Oh yeah missed that, it should be :

CRGB x;
CRGB temp;

Nope, your delay based pattern should work just fine. The leds do need a 'break' in between .show(), but the library takes care of that (also it is not in that order of size, but much shorter anyway) . with 34ms x 296 steps you get a full cycle about every 10 seconds, that should also be ok.