telephone system

hey guys how can i add a number to an int every time i press a button lets say i have 7 buttons with each a diffrent number value

i have it like this

public int InputAdress;

public void button1()
InputAdress += 2;

the thing is i dont know how to add the number to the int like 1234567 becouse this way it does it like 1+2+3+4
i want to use it like a telephone dail system

Is there a reason this need to be an int? This could be easily solved if you’d use a string instead.

string inputAdress = "";
public void button1() {
     inputAdress += "1";

(I assume, because of the title of your question, you don’t need this number to behave as an int. If you want to use it as an int for some reason you can try parse the string.)

i think i was just thinking the wrong way by using an int this works fine man thanks. ill give you a 5 points reward :smiley: