Help Needed For New User

I am writing my code for a school assignment, I am making a device that generates a random number and from there detects certain sensor e.g. button, vibration and motion sensor. It is currently under construction.

I am having an issue with an error message that says:

exit status 1
‘lcd’ does not name a type.

Can someone please help me find what is wrong, it would be gratefully appreciated.

I have attached my code.

DIG_ASSIGNMENT_2.2.ino (2.11 KB)

When I compile you code, I get:

sketch_jun02a.ino:1:31: warning: LiquidCrystal_I2C.h: No such file or directory
sketch_jun02a.ino:38:3: warning: multi-line comment
sketch_jun02a.ino:46:3: warning: multi-line comment
sketch_jun02a.ino:73:3: warning: multi-line comment
sketch_jun02a.ino:86:3: warning: multi-line comment
sketch_jun02a:3: error: 'LiquidCrystal_I2C' does not name a type
sketch_jun02a.ino: In function 'void setup()':
sketch_jun02a:23: error: 'lcd' was not declared in this scope
sketch_jun02a.ino: In function 'void loop()':
sketch_jun02a:36: error: 'LiquidCrystal_I2C' was not declared in this scope
sketch_jun02a:36: error: expected `;' before 'lcd'
sketch_jun02a:49: error: 'lcd' was not declared in this scope
sketch_jun02a.ino: At global scope:
sketch_jun02a:75: error: expected constructor, destructor, or type conversion before '.' token
sketch_jun02a:76: error: expected unqualified-id before 'if'
sketch_jun02a:80: error: expected unqualified-id before 'else'
sketch_jun02a:85: error: expected declaration before '}' token

First, why are you starting a new thread on the SAME f**king problem?
Second, why haven't you fixed any of the issues that were pointed out in your other thread(s)?

It is OBVIOUS why lcd does not name a type. Why haven't you fixed that problem? You start fixing problems at the top, NOT somewhere in the middle.

Don’t EVER do this

 //-----------------BUTTON----------------------\\
  if (randNumber = 0) {

Cutesy symmetrical comments - hate them.

Don't EVER do this

What AWOL meant was "Don't EVER do either of these...".