Problems completing programming for electronic foosball arduino project

For my associates degree final project in electrical engineering I have been tasked to build an electronic foosball table game. I have been working closely with my C language instructor on this project but I cant seem to get this done. I am asking the community for any and all assistance and comments regarding my code.

#include <STDIO.h>

char hilow;
String outtput[4];
int i;
int P1padScore = 0;
int P2padScore = 0;

void setup ()
{
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(A1, INPUT);
  pinMode(A2, INPUT);
 
}

 int ZeroOut (void)  {
  digitalWrite (0,LOW);
  digitalWrite (1,LOW);
  digitalWrite (2,LOW);
  digitalWrite (3,LOW);
  digitalWrite (4,LOW);
  digitalWrite (5,LOW);
  digitalWrite (6,LOW);
  digitalWrite (7,LOW);
  int result;
}
String BinaryFunc (outtput)  {
    for (int i=0;i<4;i++)  {
      char hilow = (outtput.charAt (i));
        switch (hilow)  {
          case 1: pin[i] = HIGH;
            case 0: pin[i] = LOW;  }  }
              String result;
 }  
String DigiWriteFunc (pin[])  {
  for (int i=0;i<4;i++)  {
    digitalWrite(outpin[i],pin[i]);
  }    String result;
}      
String DigiWriteP2Func (pin[])  {
  for (i=0;i<4;i++)  {
    switch (i)
      case :0;
        if (i = HIGH) digitalWrite (4,HIGH);
          else (digitalWrite(4,LOW));
      case :1;
        if (i = HIGH) digitalWrite (5,HIGH);
          else (digitalWrite(5,LOW));
      case :2;
        if (i = HIGH) digitalWrite (6,HIGH);
          else (digitalWrite(6,LOW));
      case :3;
        if (i = HIGH) digitalWrite (7,HIGH);
          else (digitalWrite(7,LOW));
  }  String result;
}
          
int FuncP1padScore (P1padScore)  {
  for (i=0,i<9,i++)  {
    i++
      outtput=(i,BIN);
        delay (10);
  }     String result;
}       
int FuncP2padScore (p2padScore)  {
  for (i=0,i<9,i++)  {
    i++
      outtput=(i,BIN);
        delay (10);
  }     String result;
}
  
}
void loop()
{
  ZeroOut();
  while (P1padScore < 9) && (P2padScore < 9)  {
    analogRead (A1)
    analogRead (A2)
      switch 
        case 1: analogRead A1 > 512
        P1padScore ++;
          P1padScore ();
          BinaryFunc ();
          DigiWriteFunc ();
          
        case 2: analogRead A2 > 512
        P2padScore ++;
          P2padScore ();
          BinaryFunc ();
          DigiWriteP2Func ();
          
  }

These are my error codes:

FoosballSketch:6: error: ‘outtput’ was not declared in this scope
FoosballSketch:7: error: ‘pin’ was not declared in this scope
FoosballSketch:7: error: expected primary-expression before ‘]’ token
FoosballSketch:8: error: ‘pin’ was not declared in this scope
FoosballSketch:8: error: expected primary-expression before ‘]’ token
FoosballSketch:9: error: ‘P1padScore’ was not declared in this scope
FoosballSketch:10: error: ‘p2padScore’ was not declared in this scope
FoosballSketch:41: error: redefinition of ‘String BinaryFunc’
FoosballSketch:6: error: ‘String BinaryFunc’ previously declared here

switch (i)
      case :0;

How closely have you been working with a C language instructor?

outtput=(i,BIN);

That will account for the missing "outputt". What is that line supposed to do?

 }  }
              String result;
 }

I hate it when that happens. Did you mean to use a "return"?

It is very odd code indeed. It shows little understanding of C in an embedded situation
What is:-

#include <STDIO.h>

Doing here! Do you need it? It takes up gobs of resource for no use at all.

You also make a lot of use of the String variables why?
What do you expect String outtput[4]; to declare?
Then you are declaring inputs to functions without the variable type:-
String BinaryFunc (outtput)
Then you are using the array pin without ever having declared it.

Is your C language instructor a fake that he can not spot any of this?

while (P1padScore < 9) && (P2padScore < 9)  {
    analogRead (A1)
    analogRead (A2)

Even if this compiled, all it would do is waste about 200 microseconds.

How did you arrive at such a large sketch that cannot work?

The idea of the code was to start the count incrementing as a base ten integer. That number would then get turned into a four bit binary number by way of a string. The next function was to recognize the ones and zeros of that string as highs and lows. Then the last function was to output those high and lows to the corresponding pins.

I read through it again - I couldn't even auto-format it.

Scrap it.

Start again. Add comments.

Ok, Ill try to start again from the ground up. I would appreciate then any suggestions you have that could make this task simpler please. You have the general idea i am trying to accomplish in my previous reply so how would you go about it in a way that would make sense to you.

For a start, I wouldn't use pins zero and one for anything other than serial debugging. Numbers are stored internally in binary - converting to and from Strings is completely pointless - have a look at the bitRead function.

I don't pretend to understand your loop () function, so I won't comment.

Start with something that reads your sensors and can tell you the score using the serial port. Don't use Strings at all. Only when that is working reliably should you move on to the display.

You might find it useful to write the code that does the display as a separate sketch initially and just have it run through all possible scores as an early test.