Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Wow haha, I feel stupid.

Discussion in 'General Discussion' started by N1warhead, Nov 23, 2014.

  1. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Has anyone ever sat for hours upon hours trying to wonder why your script just doesn't work when it turns out you just forgot to put it on the Player? HAHA.
     
  2. FlashX

    FlashX

    Joined:
    Nov 16, 2013
    Posts:
    51
    Haha! All the bloody time! Lol!
     
    elmar1028 and N1warhead like this.
  3. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    That's just absurd, I've never done anything like that.*

    * That statement is a bull-faced lie
     
    Stoven, IcyPeak and N1warhead like this.
  4. R-Lindsay

    R-Lindsay

    Joined:
    Aug 9, 2014
    Posts:
    287
    daily.
     
    N1warhead and Ony like this.
  5. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,973
    I've edited scripts and wondered why they don't work, ARGH! NOTHING HAPPENING! (oh, I was editing a script from the wrong project folder).
     
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    hahahahaahahaha glad I'm not the only one!!!!
     
    R-Lindsay and Ony like this.
  7. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    I would not dare try to count the times I've done this exact same thing.
     
    Ony likes this.
  8. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    LOL I've done that a few times my self LOL.
     
    Ony likes this.
  9. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    Identical story.

    I was playing around with Unity's UI and was trying to figure out why the script doesn't do anything when I press the button.

    Hour later I realized I didn't assign my function to the UI.
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    10,962
    In my experience, all weird bugs and techincal errors we get end with someone finally saying "Gah! I'm an idiot!...".
     
    RJ-MacReady and Ony like this.
  11. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    hahahahahah soooo true!
    If you ask me, they should start teaching programming in High School or heck even middle school, it will help develop kids brains to actually think for once lol.

    (Lord only knows I needed something like this when I was younger to stay outta trouble LOL)
     
  12. R-Lindsay

    R-Lindsay

    Joined:
    Aug 9, 2014
    Posts:
    287
    They do, if you're lucky
     
  13. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Yeah same thing here, usually I make a function that is meant to run every frame, but I forget to put it in the update loop and spend 10 minutes mucking around. It is then I figure out, I was the slowest person in those 10 minutes.
     
  14. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    I've tried to get into programming as a kid and I even had some basic Java leraning blocks at university but to be honest - before I actually really really wanted to learn more about it the concepts never really stuck to my brain. As much as I am for having a basic programming course at school I think it should be offered as voluntarily learning blocks for those interested in more than the basics. And game scripting should be a thing. Not just calculators or a command line text version of the towers of hanoi.

    obligatory disclaimer: I still would never consider myself a programmer. I am an artist but I am starting to grasp concepts and get things done. ;)

    (edit) and on topic - yes I've also wondered why scripts don't work which I had not stuck onto any game object yet. But I actually like those *facepalm* moments when it clicks you actually find the thing that went wrong. As long as it didn't cost too much time.
     
  15. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    yeah that's what I meant LOL.

    And pfft, I've spent DAYS of 16 hour days not knowing why something just didn't work and could have sworn I've checked and nope wasn't on player LOL.
     
    Ony likes this.
  16. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Someone should write a plugin to warn you if you're editing an unused script more than 2 times in a row.
     
    Ony likes this.
  17. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    That's actually a good idea LOL.
    But how would this said script know LOL?
     
  18. nestg

    nestg

    Joined:
    Oct 8, 2012
    Posts:
    155
  19. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    Hi
     
  20. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    No
     
  21. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    This thing happens to me sometimes :p
     
    Ony likes this.
  22. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    When I have the willpower to use proper style, I never have this issue, because there's only 1 gameobject and 1 script in the scene. :)

    There are other scripts... but not until the game runs.
     
  23. Grimwolf

    Grimwolf

    Joined:
    Oct 12, 2013
    Posts:
    296
    The most common problem I've had programming in the past is forgetting to place a single semicolon or bracket somewhere.
    Queue hours of hair-pulling...
     
  24. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    Doesn't Unity point out where error is?
     
  25. Grimwolf

    Grimwolf

    Joined:
    Oct 12, 2013
    Posts:
    296
    That's why I said "in the past".
     
  26. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Debug.Log("Line reached");
    *stare at the blank console*

    GRAAAH!
     
  27. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,973
    10 PRINT "ONY"
    20 GOTO 11
     
    superpig and zombiegorilla like this.
  28. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    585
    It once took me many hours to find some mistake in a PHP script I was writing. Turned out to be I forgot a $ sign in front of some variable so it looked like a constant and it gave no error.
     
    elmar1028 and Ony like this.
  29. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Gotta love that unique and awkward $Syntax. Is there a swagscript language that uses #variable?
     
  30. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    Now this, I have done, just recently in fact.
     
    Ony likes this.
  31. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Over the years .... I think I've learned "Hello World!" in 7 - 9 different languages I never followed further.
     
  32. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,952
    The challenge there is what is "unused". I have tons of scripts that reside only in the project or attached at runtime.
     
  33. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    This may or may not have happened last night.
     
    zombiegorilla and Ony like this.
  34. CaoMengde777

    CaoMengde777

    Joined:
    Nov 5, 2013
    Posts:
    813
    lool last night i had an
    if ()
    if()
    and it shoulda been
    if()
    else if()
    couldnt figure out why it didnt work for hoourrss.. and they code inside the ifs i changed sooo many times... what a dummy haha ><
    ... i was doing alot of things that just used if() just a little while before..
     
  35. KingTooTall

    KingTooTall

    Joined:
    Oct 17, 2014
    Posts:
    61
    And here i thought i was the only one with 2 23inch lg monitors @1920x1280 resolution, with ultra edit open with 5 scripts in different size windows, unity, mono open with 10 tabs full, amongst the 20 other windows open with various other software running...(blender,winamp,email, sega emulator playing guardian heros (yes i got the rom lol) ...) yeah, i keep wondering why i keep chaninging scrilts in ultra edit and NOTHING happens, not even an error. Lol
     
  36. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    Like tomnnn was saying, these kinds of mistakes are exactly why the first thing I always do if something doesn't run when I expect it to, is to stick a Debug.Log("blah"); or similar to ensure that code is ever actually reached! I do the same thing a lot. I have had too many moments of "where's the error in this method?" when the problem is really "did I ever actually call this method somewhere?". Oh how much time I'll spend re-re-re-writing working code haha.
     
    Ony likes this.
  37. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Yea... it's a hard habit to overcome to assume something is wrong with the method or an unrelated part of the code without ever verifying that the code actually ran ._. But I'm mostly there now. Now, most methods will have debugs in them until they're working correctly :D
     
    MD_Reptile and Ony like this.
  38. KingTooTall

    KingTooTall

    Joined:
    Oct 17, 2014
    Posts:
    61
    "Mam...uhh..... IS IT PLUGGED IN?"

    LOL
     
  39. Kinos141

    Kinos141

    Joined:
    Jun 22, 2011
    Posts:
    969
    Yup.

    One time, I couldn't understand why my script wouldn't work, only to find out it was not attached to the gameobject. FML.
     
  40. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Just pretend the gameobjects are your facebook friends. If you're not seeing constant updates, something is wrong.
     
  41. Tanel

    Tanel

    Joined:
    Aug 31, 2011
    Posts:
    508
    Yeap, that happens sometimes ( I realize it pretty soon though, not after several hours :p).

    A similar thing happens to me with 2D/3D Physics stuff. Tearing my hair out wondering why my OnTriggerEnter won't fire until finally realizing I'm not using 2D versions of the methods.
     
  42. Deleted User

    Deleted User

    Guest

    I guess we've all been there, done that lol
    I did that especially when I started with Unity 2.6 :D

    Some months ago I wondered why my physic didn't change like I changed the values in the physic materials, of course I forgot to add the new one...