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
/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;
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
Your answer
![](https://koobas.hobune.stream/wayback/20220612060347im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
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