sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Odd Ruby Error

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 1.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      g2ktcf
      last edited by

      I am using the RDE to make my SU Ruby script. I got a strange issue today: elseif was not a recognized keyword in the RDE but is listed in the ruby documentation. I could not get the code to run until I made nested if/then/else/end blocks. Anyone else seen this?

      Chris

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        try elsif

        Todd

        1 Reply Last reply Reply Quote 0
        • M Offline
          mocathe1st
          last edited by

          I had this same problem a while ago. This seems to be a weird feature of Ruby where the elsif statement differs from most other programming languages. This is one case where Ruby breaks the "Principle of Least Surprise" that everyone seems to praise it for. 😠

          See this article for a tutorial on Ruby conditionals: http://www.math.umd.edu/~dcarrera/ruby/0.3/chp_02/conditionals.html

          1 Reply Last reply Reply Quote 0
          • G Offline
            g2ktcf
            last edited by

            Thanks Todd! I never could have imagined that the spelling was different!!!! πŸ˜† I REALLY feel stupid now.....................

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement