Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by bigboss96 · Jan 15, 2016 at 09:03 PM · erroreditorcharacter

HOW DO I FIX THESE ERRORS!!!

I don't know how to fix these errors...... /GetCharacterInfo.cs(36,25): error CS0029: Cannot implicitly convert type Unitycoding.CharacterSystem.Character' to Character'

/GetCharacterInfo.cs(39,44): error CS1061: Type Character' does not contain a definition for onChange' and no extension method onChange' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(47,44): error CS1061: Type Character' does not contain a definition for onChange' and no extension method onChange' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(52,48): error CS1061: Type Character' does not contain a definition for Name' and no extension method Name' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(53,48): error CS1061: Type Character' does not contain a definition for Gender' and no extension method Gender' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(54,53): error CS1061: Type Character' does not contain a definition for Description' and no extension method Description' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(55,47): error CS1061: Type Character' does not contain a definition for CharacterName' and no extension method CharacterName' of type Character' could be found (are you missing a using directive or an assembly reference?)

/GetCharacterInfo.cs(56,59): error CS1061: Type Character' does not contain a definition for RuntimeGameObject' and no extension method RuntimeGameObject' of type Character' could be found (are you missing a using directive or an assembly reference?)

  #if ICODE
  using UnityEngine;
  using System.Collections;
  using Unitycoding;
  using Unitycoding.CharacterSystem;
  
  namespace ICode.Actions.CharacterSystem{
      [Category("Character System")]    
      [Tooltip("Get selected character information.")]
      [System.Serializable]
      public class GetCharacterInfo : StateAction {
          [Shared]
          [NotRequired]
          [InspectorLabel("Class")]
          public FsmString _class;
          [Shared]
          [NotRequired]
          public FsmString gender;
          [Shared]
          [NotRequired]
          public FsmString description;
          [Shared]
          [NotRequired]
          [InspectorLabel("Name")]
          public FsmString _name;
          [Shared]
          [NotRequired]
          public FsmGameObject runtimeGameObject;
          [Tooltip("Stop to update the character on exit of the state.")]
          public FsmBool stopOnExit;
  
          private Character mCharacter;
  
          public override void OnEnter ()
          {
              mCharacter = Unitycoding.CharacterSystem.CharacterSystem.selectedCharacter;
              if (mCharacter != null) {
                  OnCharacterChange(mCharacter);
                  mCharacter.onChange.AddListener(OnCharacterChange);
              }
              Finish ();
          }
  
          public override void OnExit ()
          {
              if (mCharacter != null && stopOnExit.Value) {
                  mCharacter.onChange.RemoveListener(OnCharacterChange);
              }
          }
  
          private void OnCharacterChange(Character character){
              _class.Value=character.Name;
              gender.Value=character.Gender.ToString();
              description.Value=character.Description;
              _name.Value=character.CharacterName;
              runtimeGameObject.Value=character.RuntimeGameObject;
          }
          
      }
  }
  #endif
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jessespike · Jan 15, 2016 at 09:19 PM 0
Share

/GetCharacterInfo.cs(36,25): error CS0029: Cannot implicitly convert type Unitycoding.CharacterSystem.Character' to Character'

Do you have two classes both named Character? What if you change the Character to a CharacterSystem.Character?

  //private Character mCharacter;
  private Unitycoding.CharacterSystem.Character mCharacter;

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by bigboss96 · Jan 15, 2016 at 09:40 PM

when I do that I get this error

Assets/Zerano RPG Kit/Unitycoding/Character System/Scripts/Integrations/ICode/GetCharacterInfo.cs(37,31): error CS1525: Unexpected symbol private' %|762738615_1|% %|-451719703_2|% %|1719815761_3|% %|-1826137714_4|% using Unitycoding.CharacterSystem; %|-1018987220_6|% %|1558077980_7|% %|-1948513161_8|% %|545371414_9|% %|-1568498997_10|% %|-1678086808_11|% %|1596445877_12|% [NotRequired] [InspectorLabel("Class")] %|1555009369_15|% %|-219315344_16|% %|210634300_17|% %|-1472576534_18|% %|-1575628349_19|% [NotRequired] %|1805474672_21|% %|-1448059071_22|% %|1279032779_23|% %|2114231112_24|% %|-1573778831_25|% [Shared] %|-2046781747_27|% %|-334997572_28|% %|1171884759_29|% %|1598049430_30|% %|-1021993088_31|% %|-2132798270_32|% %|1676482239_33|% %|583731059_34|% %|2113080664_35|% //private Character mCharacter; %|1140319951_37|% %|-668286529_38|% %|1134235179_39|% %|-1653184136_40|% %|1836493430_41|% %|2121834956_42|% %|1934984215_43|% Finish (); %|1591722104_45|% %|102403222_46|% %|-1530635358_47|% %|-1990421933_48|% %|-724044887_49|% mCharacter.onChange.RemoveListener(OnCharacterChange); %|-2057002974_51|% %|1557984143_52|% %|-1536180232_53|% private void OnCharacterChange(Character character){ _class.Value=character.Name; gender.Value=character.Gender.ToString(); description.Value=character.Description; %|212206235_58|% %|1037583733_59|% %|-1186160523_60|% %|-2063056648_61|% %|178123966_62|% %|-805698050_63|% #endif when I remove private I then get.... this error Character System/Scripts/Integrations/ICode/GetCharacterInfo.cs(41,33): error CS1502: The best overloaded method match for ICode.Actions.CharacterSystem.GetCharacterInfo.OnCharacterChange(Character)' has some invalid arguments

Character System/Scripts/Integrations/ICode/GetCharacterInfo.cs(41,33): error CS1503: Argument #1' cannot convert Unitycoding.CharacterSystem.Character' expression to type Character' Character System/Scripts/Integrations/ICode/GetCharacterInfo.cs(42,53): error CS0123: A method or delegate ICode.Actions.CharacterSystem.GetCharacterInfo.OnCharacterChange(Character)' parameters do not match delegate UnityEngine.Events.UnityAction<Unitycoding.CharacterSystem.Character>(Unitycoding.CharacterSystem.Character)' parameters Assets/Zerano RPG Kit/Unitycoding/Character System/Scripts/Integrations/ICode/GetCharacterInfo.cs(50,44): error CS1061: Type Character' does not contain a definition for onChange' and no extension method onChange' of type `Character' could be found (are you missing a using directive or an assembly reference?)

and a bunch of other code errors.....

 #if ICODE
 using UnityEngine;
 using System.Collections;
 using Unitycoding;
 using Unitycoding.CharacterSystem;
 
 namespace ICode.Actions.CharacterSystem{
     [Category("Character System")]    
     [Tooltip("Get selected character information.")]
     [System.Serializable]
     public class GetCharacterInfo : StateAction {
         [Shared]
         [NotRequired]
         [InspectorLabel("Class")]
         public FsmString _class;
         [Shared]
         [NotRequired]
         public FsmString gender;
         [Shared]
         [NotRequired]
         public FsmString description;
         [Shared]
         [NotRequired]
         [InspectorLabel("Name")]
         public FsmString _name;
         [Shared]
         [NotRequired]
         public FsmGameObject runtimeGameObject;
         [Tooltip("Stop to update the character on exit of the state.")]
         public FsmBool stopOnExit;
 
         private Character mCharacter;
 
         public override void OnEnter ()
         {
             //private Character mCharacter;
           Unitycoding.CharacterSystem.Character mCharacter;
 
             mCharacter = Unitycoding.CharacterSystem.CharacterSystem.selectedCharacter;
             if (mCharacter != null) {
                 OnCharacterChange(mCharacter);
                 mCharacter.onChange.AddListener(OnCharacterChange);
             }
             Finish ();
         }
 
         public override void OnExit ()
         {
             if (mCharacter != null && stopOnExit.Value) {
                 mCharacter.onChange.RemoveListener(OnCharacterChange);
             }
         }
 
         private void OnCharacterChange(Character character){
             _class.Value=character.Name;
             gender.Value=character.Gender.ToString();
             description.Value=character.Description;
             _name.Value=character.CharacterName;
             runtimeGameObject.Value=character.RuntimeGameObject;
         }
         
     }
 }
 #endif
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bigboss96 · Jan 15, 2016 at 09:45 PM 0
Share

man....not sure how to fix this problem :/!

avatar image bigboss96 · Jan 16, 2016 at 01:45 AM 0
Share

someone help

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

48 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Editor Error Build,Unity Editor Error build 0 Answers

Unity Editor CRashes Instantly after load (pls helps D:) 0 Answers

Canvas Error - Everything tinted blue 2 Answers

Cant Shoot client, Unet 0 Answers

PlayerPrefs not debugging 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges