Author Topic: [Solved]Scale of 0 is invalid! Zero cannot be divided by, which causes problems  (Read 4260 times)

Disastercake

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 87
  • www.disastercake.com
    • View Profile
    • Disastercake
After updating I get this error:

  1. if (min == 0f)
  2.                                         {
  3.                                                 Debug.LogError("Scale of 0 is invalid! Zero cannot be divided by, which causes problems. Use a small value instead, such as 0.01\n" +
  4.                                                 node.trans.lossyScale, node.trans);
  5.                                         }
  6.  

I can't tell which object it's coming from, since I'm not setting any NGUI widgets to a scale of 0.  I was never getting this error before the update either.


Solved:
After troubling shooting some weird issues with progress bard caused by the recent update, I realized that for some reason the update automatically set a bunch of different ( but not all) sliders to have a Y value of 0.  Not sure how the heck that ended up happening, but changing them fixed this.
« Last Edit: March 12, 2013, 11:44:09 PM by Disastercake »
Creator of Soul Saga.
http://www.disastercake.com

dlewis

  • Guest
I can't find that code in NGUI myself, but the way to tell where a log is coming from is to include the object in the debug.log message.

ie.
  1. Debug.Log("This message is coming from this object", this);

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
This error popped up suddenly for me too. Thanks to the advice on this thread it was a simple fix, but this error didn't happen before. Is something really bad going to happen if I leave my stuff at 0.0f and not 0.01f?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Yes. Don't do it. This question was asked and answered a hundred times now. Do a search.

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
I did do a search and up popped this topic. The "why now at this late stage" error has probably been confusing a lot of people like me late into their development.

If it has indeed been asked and answered a hundred times now, perhaps you should make a sticky about it and what the issue means, to prevent idiots like me asking stupid questions.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
You're not an idiot, I've seen you ask some good questions. :P

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
Haha, I am an idiot. It's just that you don't know me well enough yet.  ;)

Besides, after I made the previous post, I looked in the FAQ and found the solution to the issue that you posted. in February! So it was already there after all, albeit right at the bottom.