Input button and variable to void

I'm doing with GSM Shield inputs and outputs, its working all fine, I learn about input and variable, because if input is HIGH cause send a SMS done but often send a SMS because input staying HIGH already since input changed HIGH, when input is LOW after was HIGH cause send a SMS is different ok. Variable 0-255, variable change number after when first input was high and then still HIGH, when input is HIGH and variable changed number wont happen because sent a SMS once since even staying HIGH, if input change from HIGH to LOW and variable cause going to send a SMS is different before variable let change number is back for rest for LOW will to HIGH.

 if (buttonState == HIGH) {

How put add between input AND variable?

In my experience of PICAXE I show example

.
 let b1=5 
.
.
let b1=8
.
main:
if pin2=0 and b1=5 then ......
if pin2=1 and b1=8 then ......
goto main

Something like picaxe put between input and variable. I want to learn for Arduino, I'm trying to search find basic commands, anyone help me.

Code:

if (buttonState == HIGH) {

How put add between input AND variable?

You mean like if ((buttonState == HIGH) and (b == 5)) { ? Or if ((buttonState == HIGH) && (b == 5)) {

I got it, thanks, but got error, not sure maybe need to put setup for variable.

How put for let change number of variable after input and variable done?

.
.
  if (buttonState1 == HIGH)  //Knock
  {
   knock(); 
  }
   else  if ((buttonState2 == HIGH) and (b == 1))    //Blackout
  {
  blackout(); 
  }
   else  if ((buttonState2 == LOW) and (b == 2))    //Powerback
  {
  powerback(); 
  }
.
.

Error here;
SmartHome9_add_blackout_and_auxin.ino: In function ‘void loop()’:
SmartHome9_add_blackout_and_auxin:135: error: ‘b’ was not declared in this scope

Try "b1" then - I only gave a snippet of solution, because you only gave a snippet of problem.

When I changed "b1" then tried it so still error, I figured out while search websites, I realized have to put "long b1;" first which on top code like "int...." area before below "setup()" Its done! no error. Now when input and variable then done and then how let change number like from b1==1 to b1==2 put "else if ((buttonState2 == HIGH) and (b1 == 1))" together area?

Like picaxe show

main:
if pin1=1 and b1=1 then
b1=2    'change 1 to 2
goto .......
endif

Which “int b1;” or “long b1;” put for variable?

how change number of variable after pass? change from b1==1 to b1==2 put in *******

.
.
 else  if ((buttonState2 == HIGH) and (b1 == 1))    //Blackout
 {
*******?
 blackout(); 
 }
.
.

I figured out, "b1==2;"

  else  if ((buttonState3 == HIGH) and (b1 == 1))    //Blackout
  {
b1==2;
  blackout(); 
  }

Is that like right?

I will test with it soon.

Which "int b1;" or "long b1;" put for variable?

Only you can answer that - we can't see your code, or your intentions.

Is that like right?

No, performing a comparison and doing nothing with the result is pointless.

All right, understand. I got it, its done, now I learnt about between input and variable. Thankyou.