+ Reply to Thread
Results 1 to 4 of 4

Thread: Simple gate, new wire user

  1. #1
    Inactive Sgt. Redneck is on a distinguished road Sgt. Redneck's Avatar
    Join Date
    Jun 2007
    Posts
    3

    Default

    Hey, how come this expression always returns 0 through Drain even when Data has a non-zero value and Source is pulsing from 0 to 1 over and over?

    Code:
    I@Data Source
    O@Drain
    Out = 0, Source > 0 -> Out = Data;
    
    This is supposed to function something like a transistor, except the crap passed through can be any number (not just 0 or 1).

    Thanks and sorry for what I am sure is the biggest nub question for you guys.

  2. #2
    Inactive jj6400 is on a distinguished road jj6400's Avatar
    Join Date
    May 2007
    Posts
    9

    Default

    Unless you later in the code make Drain = Out, then you either need to change all Out to Drain or all Drain to Out. The way you have it you never actually make Drain anything.
    ******When life gives you lemons set them on fire******
    **************and throw them at children!**************

  3. #3
    Inactive Sgt. Redneck is on a distinguished road Sgt. Redneck's Avatar
    Join Date
    Jun 2007
    Posts
    3

    Default

    Oh for **** sakes... Thanks... Well thats one of the most dumbass coding mistakes I have ever made...

  4. #4
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default

    While I'm at it, it could also be written as

    Code:
    I@Data Source
    O@Drain
    Drain = Source > 0 ? Data : 0;
    

+ Reply to Thread

Similar Threads

  1. Wire Toolgun user?
    By ShadowVipr in forum Wiremod General Chat
    Replies: 5
    Last Post: 05-16-2009, 03:16 PM
  2. Wire User error
    By andy1976uk in forum Bug Reports Archive
    Replies: 7
    Last Post: 11-15-2007, 01:05 PM
  3. Broken Wire User
    By andy1976uk in forum Bug Reports Archive
    Replies: 4
    Last Post: 08-08-2007, 01:20 PM
  4. Wire Pod / User suggestions
    By andy1976uk in forum Ideas & Suggestions
    Replies: 6
    Last Post: 08-05-2007, 09:08 PM
  5. Wire User?
    By timas in forum Help & Support
    Replies: 6
    Last Post: 06-27-2007, 07:34 AM

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