Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.14 seconds.

  1. Replies
    7
    Views
    1,222

    [SOLVED] Re: Unexpected type

    Okay, fair enough. You're still using the ternary operators incorrectly. The ternary operator must evaluate to a value, not an expression. So you can't do this:


    x > 0 ? y = 1 : y = 2;


    You...
  2. Replies
    7
    Views
    1,222

    [SOLVED] Re: Unexpected type

    The compiler doesn't "hint" at anything. It gives you very specific errors.

    You have multiple syntax errors in this code. You're using the ternary operator incorrectly, and you have a random if...
  3. Replies
    7
    Views
    1,222

    [SOLVED] Re: Unexpected type

    You tell us. What lines are the errors on? What types are you working with on those lines? What types is it expecting?
Results 1 to 3 of 3