Not sure what or where to declare "i"

Hi! So I'm very green to all of this and I am following a project on making Graphic Poi (basically a light tube you swing around and it shows a bitmap. In the tutorial they post that they "key to the loop" is this code:

   for (int x=0;x<f;x++){
     for(z=NUM_LEDS;z>0;z--){
       leds[z-1]=array[x+((j-z)*f)];}
     FastLED.show();

They then post an "example code" where I filled out the array area with my own image converted through a link provided:

#include "FastLED.h"

#define NUM_LEDS 60 //number of leds in strip length on one side
#define DATA_PIN 2//7 = second hardware spi data
#define CLOCK_PIN 3//14 = second hardware spi clock
CRGB leds[NUM_LEDS];
int numberOfSlices = 150;

void setup() {

delay(200);
FastLED.addLeds(leds, NUM_LEDS);
}

const unsigned int array1[] = { 0x000100, 0x000100, 0x000100, 0x000100, 0x000100, 0x000100, /*etc .. add your values here*/}; //end of array

void loop() {

PoiSonic(8000,array1);//holly
}

void PoiSonic(unsigned long time, const unsigned int array[]){
unsigned long currentTime = millis();
while (millis()< currentTime + (time)) { int f= numberOfSlices; int z; //a counter int j=NUM_LEDS; for (int x=0;x0;z--){
leds[z-1]=array[x+((j-z)*f)];}
FastLED.show();
delayMicroseconds(40); //may need to increase / decrease depending on spin rate
}
delayMicroseconds(1000); //may need to increase / decrease depending on spin rate
}
}

I have made minor adjustments based on currently functioning examples to get it to ALMOST verify. But when I add the first chunk of code into the loop it comes up with "f" was not declared in this scope. If I leave it out it does the same thing just further down in the code? Any help of what to do here or where to declare what?

Error Messages:

Arduino: 1.8.12 (Windows 10), TD: 1.52, Board: "Teensy 3.5, Serial, 120 MHz, Faster, US English"

In file included from C:\Users\snore\AppData\Local\Temp\arduino_modified_sketch_234499\strandtest.ino:11:0:

C:\Users\snore\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003

 #    pragma message "FastLED version 3.003.003"

                     ^

strandtest: In function 'void loop()':
strandtest:93: error: 'f' was not declared in this scope
    for (int x=0;x<f;x++){

                   ^

strandtest:94: error: 'z' was not declared in this scope
      for(z=NUM_LEDS;z>0;z--){

          ^

strandtest:95: error: 'array' was not declared in this scope
        leds[z-1]=array[x+((j-z)*f)];}

                  ^

strandtest:95: error: 'j' was not declared in this scope
        leds[z-1]=array[x+((j-z)*f)];}

                            ^

strandtest:98: error: 'PoiSonic' was not declared in this scope
 PoiSonic(8000,array1);//holly

                     ^

strandtest:101: error: a function-definition is not allowed here before '{' token
 void PoiSonic(unsigned long time, const unsigned int array[]){

                                                              ^

strandtest:110: error: expected '}' at end of input
 }

 ^

Multiple libraries were found for "FastLED.h"
 Used: C:\Users\snore\Documents\Arduino\libraries\FastLED
 Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\FastLED
'f' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

EDIT: My bad, here's the actual slightly modified code I ran. I have chopped down the actual array data to fit in this forum. I assure you it is just a long series of 0x00000 type data.

/*
*This sketch outputs images to persistence of vision led strips
*It uses FastLed to drive APA102 leds, sending colour values from
*arrays held in flash memory (designated by 'const'). You need to
*set the number of slices you have made your image into,
*e.g. bmp image of 60 pixels high by 150 wide
* would give 60 num_leds and
* 150 slices (number of slices you have made your image into)
*/

#include <FastLED.h>

#define NUM_LEDS 60 //number of leds in strip length on one side
#define DATA_PIN 6//7 = second hardware spi data
#define CLOCK_PIN 3//14 = second hardware spi clock
CRGB leds[NUM_LEDS];
int numberOfSlices = 100;


void setup() {


delay(200);
FastLED.addLeds<WS2812, DATA_PIN> (leds, NUM_LEDS);
}
const unsigned int array1[] = { 0x000000, 0x000000, 0x000000 }; //end of array THIS WAS THE MASSIVE WALL OF TEXT EDITED OUT. IF YOU NEED THE FULL BLOCK FOR SOME REASON LET ME KNOW

void loop() {


   for (int x=0;x<f;x++){
     for(z=NUM_LEDS;z>0;z--){
       leds[z-1]=array[x+((j-z)*f)];}
     FastLED.show();

PoiSonic(8000,array1);//holly
}

void PoiSonic(unsigned long time, const unsigned int array[]){
unsigned long currentTime = millis();
while (millis()< currentTime + (time)) { int f= numberOfSlices; int z; //a counter int j=NUM_LEDS; for (int x=0;x0;z--){
leds[z-1]=array[x+((j-z)*f)];}
FastLED.show();
delayMicroseconds(40); //may need to increase / decrease depending on spin rate
}
delayMicroseconds(1000); //may need to increase / decrease depending on spin rate
}
}

Website to project I'm following: http://orchardelica.com/wp/?page_id=597

snoreen:
I have made minor adjustments based on currently functioning examples to get it to ALMOST verify.

You need to post the program that gives rise to the error.

...R

Woops. Duh. Edited the post to have the actually ran code at the end. As stated I deleted out the huge wall of text that is basically the bitmap file to better fit the forum.

snoreen:
Woops. Duh. Edited the post to have the actually ran code at the end..

If you have error messages, you haven't run your code.

snoreen:
Woops. Duh. Edited the post to have the actually ran code at the end. As stated I deleted out the huge wall of text that is basically the bitmap file to better fit the forum.

According to the earlier message the error is on line 93 but the program does not have a line 93.

Just post the program that actually gave to the error - and please do that in your next Reply. Don't make big changes to earlier Posts because it screws up the train of the discussion ,

...R

Maybe even post the original sketch. I'll bet 'f' was declared/defined there. It might even give you a hint where to put it in your sketch.

I can't post the code with the whole array data included due to the character restrictions of this forum.

The OG code is in the top post. It's just unclear of what to declare the variables as or where to do it. Setup or even before that?

snoreen:
I can't post the code with the whole array data included due to the character restrictions of this forum.

Then please post your entire code as an attachment.