+ Reply to Thread
Results 1 to 4 of 4

Thread: Advance wiremod e2 keypad

  1. #1
    Wire Noob MiniRazor's Avatar
    Join Date
    Dec 2009
    Posts
    14

    Smile Advance wiremod e2 keypad

    This is my code it dont work i have a round on the sceen but after all research i can't find the problem in my code to make a key pad

    Button1= +1 on Sceen 1

    Buttom2= -1 on Sceen 1

    and so on any coders that have tryd this? i need some help


    @name Coded door
    @inputs Button1 Button2 Button3 Button4 Button5 Button6 Button7 Button8
    @outputs Sceen1 Sceen2 Sceen3 Sceen4 Hydraulic
    @persist RatePerSecond ButtonRate

    if(first()) {RatePerSecond=(12)/100}
    if(first()) {ButtonRate=(30)/100}

    interval(100)
    Sceen1+=Button1*ButtonRate*(Sceen1<9)
    Sceen1-=Button2*ButtonRate*(Sceen1>0)
    Sceen2+=Button3*ButtonRate*(Sceen2<9)
    Sceen2-=Button4*ButtonRate*(Sceen2>0)
    Sceen3+=Button5*ButtonRate*(Sceen3<9)
    Sceen3-=Button6*ButtonRate*(Sceen3>0)
    Sceen4+=Button7*ButtonRate*(Sceen4<9)
    Sceen4-=Button8*ButtonRate*(Sceen4>0)

    if (Sceen1==2 & Sceen2==5 & Sceen3==7 & Sceen4==9) {Hydraulic=0} else {Hydraulic=47}

  2. #2
    Wire Sofaking Wodden's Avatar
    Join Date
    Sep 2007
    Location
    location.sh &> /dev/null
    Posts
    446

    Default Re: Advance wiremod e2 keypad

    ---Code creation in progress---
    :v:
    “Saying Java is good because it works on all operating systems is like saying anal sex is good because it works on all genders.”

  3. #3
    Wire Sofaking Wodden's Avatar
    Join Date
    Sep 2007
    Location
    location.sh &> /dev/null
    Posts
    446

    Default Re: Advance wiremod e2 keypad

    [highlight=e2]@name Keypad
    @inputs Button1 Button2 Button3 Button4 Button5 Button6 Button7 Button8 Rate Reset
    @outputs Scr1 Scr2 Scr3 Scr4 Hydraulic
    @trigger all
    if (Rate <= 0){Rate=1}
    if (~Reset & Reset){
    Scr1 = 0
    Scr2 = 0
    Scr3 = 0
    Scr4 = 0
    }
    elseif (~Button1 & Button1){
    Scr1 += Rate
    if(Scr1 < 0){Scr1=0}
    if(Scr1 > 9){Scr1=9}
    }
    elseif (~Button2 & Button2){
    Scr1 -= Rate
    if(Scr2 < 0){Scr2=0}
    if(Scr2 > 9){Scr2=9}
    }

    elseif (~Button3 & Button3){
    Scr2 += Rate
    if(Scr3 < 0){Scr3=0}
    if(Scr3 > 9){Scr3=9}
    }
    elseif (~Button4 & Button4){
    Scr2 -= Rate
    if(Scr4 < 0){Scr4=0}
    if(Scr4 > 9){Scr4=9}
    }

    elseif (~Button5 & Button5){
    Scr3 += Rate
    if(Scr3 < 0){Scr3=0}
    if(Scr3 > 9){Scr3=9}
    }
    elseif (~Button6 & Button6){
    Scr3 -= Rate
    if(Scr5 < 0){Scr5=0}
    if(Scr5 > 9){Scr5=9}
    }

    elseif (~Button7 & Button7){
    Scr4 += Rate
    if(Scr4 < 0){Scr4=0}
    if(Scr4 > 9){Scr4=9}
    }
    elseif (~Button8 & Button8){
    Scr4 -= Rate
    if(Scr4 < 0){Scr4=0}
    if(Scr4 > 9){Scr4=9}
    }

    if (Scr1==2 & Scr2==5 & Scr3==7 & Scr4==9){
    Hydraulic=0
    } else {
    Hydraulic=47
    }[/highlight]
    “Saying Java is good because it works on all operating systems is like saying anal sex is good because it works on all genders.”

  4. #4
    Wire Noob MiniRazor's Avatar
    Join Date
    Dec 2009
    Posts
    14

    Default Re: Advance wiremod e2 keypad

    Thanks but you did mess up my code :/

    i did spend 30 min on fixing it!
    Last edited by MiniRazor; 12-11-2009 at 10:53 AM.

+ Reply to Thread

Similar Threads

  1. Advance dupe bugs?
    By Zanik in forum Installation and Malfunctions Support
    Replies: 17
    Last Post: 04-08-2009, 12:08 AM
  2. Advance Duplicator Problems
    By Jon Read in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 03-29-2008, 03:15 PM
  3. advance dup not saving connections :(
    By smidge146 in forum Installation and Malfunctions Support
    Replies: 0
    Last Post: 12-12-2007, 09:16 AM
  4. Advance Duplicator Question
    By Ratboy14 in forum Installation and Malfunctions Support
    Replies: 9
    Last Post: 12-03-2007, 08:09 PM
  5. Related to Advance duplicator
    By unswizzue in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 11-07-2007, 08:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots