Conversation Between Colbex and Maruno
Showing Visitor Messages 1 to 8 of 8
  1. Maruno
    July 1st, 2010 2:01 PM
    That's... I didn't follow any of that. I'm just glad I found the answer before having to wade through all that thinking it might help.

    I've also extensively modified the scripts too to incorporate a different control style (sorry, no spoilers, but it's good!), so it may have been that any answers wouldn't have helped me in my situation anyway.
  2. Colbex
    June 30th, 2010 3:38 PM
    well you see good sir... o.o;;
    @Maruno: I copied your piece of code into my scripts and commented mine out. I tested giving, taking, canceling out of giving an item, and giving/taking mail. All of it worked fine. Then I tried giving it straight from the bag screen which is where I found your error. It's this one, correct?
    [SPOILER]Exception: NameError
    Message: undefined local variable or method `ret' for #&&&&&&&&&&&&
  3. Maruno
    June 29th, 2010 9:45 AM
    Humour me...
  4. Colbex
    June 28th, 2010 12:18 PM
    actually my work is something more along the lines of comedy... o-o;;
  5. Maruno
    June 28th, 2010 9:50 AM
    I solved it just now, actually, while replying to you. Turns out Ruby is weird, and if a variable is defined within a block (e.g. a "do" loop), then it becomes undefined again once you exit that block. The solution is to define the variable before the "do" loop begins (i.e. copy the line "ret=false" to before the "do" loop), and then it'll be usable after the loop finishes.

    It's not a bug as such, because sometimes programmers will want to use that property of blocks (e.g. use the same name for two different variables, one of which is in-loop only and the other is out-of-loop only), but in those cases I think it's just bad programming style.

    I considered this possibility before, but I dismissed it because it was a stupid thing for Ruby to do. Turns out that's how it works.

    So yeah, it's fine now. Thanks for the offer of help anyway. Might be interested to see what you came up with, though, if you want to PM me your working.
  6. Colbex
    June 27th, 2010 9:14 PM
    hey, did you ever figure out that problem you were having with your "give" or w/e? The one you posted in general game making help? o.o bc... I tried to pay you back by attempting to solve the mystery using my lackluster detective skills and making a big post, only to realize a few seconds afterwards im an idiot. anywho... the point is even though more than likely im way off your free to read my theory. just tell me. XD I save large posts to my notepad, which is good in this case as it didn't go through, therefore i didnt look like a dumbass over the entire game development thread. o.o; im sorry, at late night I get awfully talkative rather than tired...
  7. Maruno
    May 27th, 2010 7:02 AM
    No problem. Just pass on the good deed, if you can.
  8. Colbex
    May 26th, 2010 7:24 PM
    Hey, just thought I'd drop by and say, "You are the man, and thanks for the help with the battle scene." You literally just saved me loads of time and from frustration... a lot of frustration... like... the "Go curse people out on Youtube for making stupid/racist comments just because you're already mad yourself frustration". No lie.

All times are GMT -8. The time now is 2:25 AM.