Author Topic: 3.5.0 compilation errors  (Read 1947 times)

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
3.5.0 compilation errors
« on: February 16, 2014, 10:05:32 PM »
Did you forget to add the updated Localization.cs ?

Assets/NGUI/Scripts/Internal/Localization.cs(394,45): error CS0103: The name `mLocalization' does not exist in the current context

Assets/NGUI/Scripts/Internal/Localization.cs(396,46): error CS0165: Use of unassigned local variable `vals'

Assets/NGUI/Scripts/Internal/Localization.cs(399,38): error CS1502: The best overloaded method match for `System.Collections.Generic.Dictionary<string,string[]>.TryGetValue(string, out string[])' has some invalid arguments

Assets/NGUI/Scripts/Internal/Localization.cs(399,38): error CS1503: Argument `#2' cannot convert `string' expression to type `string[]'

kittikun

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 5
  • Posts: 46
    • View Profile
Re: 3.5.0 compilation errors
« Reply #1 on: February 16, 2014, 10:14:14 PM »
To fix this, replace Localization.cs:391

  1. #if UNITY_IPHONE || UNITY_ANDROID
  2.                 string mobKey = key + " Mobile";
  3.  
  4.                 if (mLanguageIndex != -1 && mDictionary.TryGetValue(mobKey, out vals))
  5.                 {
  6.                         if (mLanguageIndex < vals.Length)
  7.                                 return vals[mLanguageIndex];
  8.                 }
  9.                 else if (mOldDictionary.TryGetValue(mobKey, out val)) return val;
  10. #endif
« Last Edit: February 17, 2014, 04:55:23 AM by kittikun »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.5.0 compilation errors
« Reply #2 on: February 17, 2014, 11:09:51 AM »
You're right, thanks. Replace function missed it as it's inside an #ifdef.