Author Topic: NGUI 2.7.0 compile error  (Read 3997 times)

marsking

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
NGUI 2.7.0 compile error
« on: September 14, 2013, 01:40:02 AM »
i get error when i compile my solution in monodevelop.

the error in NGUIEditorTools.cs
information is >> Default parameters should not be used.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #1 on: September 14, 2013, 10:01:48 AM »
I guess the question is... why are you compiling it in monodevelop?

marsking

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #2 on: September 15, 2013, 08:45:49 PM »
I guess the question is... why are you compiling it in monodevelop?
our team be accustomed to build  once in monodevelop to check our code has no any error.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #3 on: September 16, 2013, 12:07:54 AM »
Well, default values for parameters is perfectly valid C# code, and both Unity and Visual Studio work just fine with it. Sounds like MonoDevelop needs to be updated.

In any case, you can resolve that error by getting rid of " = false" part, then duplicating the function header without the 'forceOn' parameter, defaulting it to 'false' inside the function itself.

marsking

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #4 on: September 16, 2013, 03:59:30 AM »
Well, default values for parameters is perfectly valid C# code, and both Unity and Visual Studio work just fine with it. Sounds like MonoDevelop needs to be updated.

In any case, you can resolve that error by getting rid of " = false" part, then duplicating the function header without the 'forceOn' parameter, defaulting it to 'false' inside the function itself.
Thanks for help! It's work now :D

npritchard

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #5 on: September 16, 2013, 04:42:44 PM »
I'm using Visual Studio 2008 Standard - I get the error as it's a .NET 4.0 feature.

It's a minor annoyance at most. I'd like to kindly request the avoidance of default parameters but appreciate the number of people affected by this is going to be low and not worth worrying about.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #6 on: September 16, 2013, 04:57:32 PM »
I've removed them for 3.0.

npritchard

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI 2.7.0 compile error
« Reply #7 on: September 16, 2013, 05:22:43 PM »
That's very kind of you, thank you.