• 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 /
avatar image
Question by Darksummoner · Aug 12, 2014 at 08:40 PM · error3dquestmode

BCE0004: Ambiguous reference 'Quest': Quest, Quest.

I downloaded this from the assest store and when I imported it I got an error (the error is in the title) heres the script!

 @CustomEditor (Quest)
 class QuestEditor extends Editor 
 {
     var Manager : QuestManager;
     
     //Quest custom editor: makes creating quests easy and simple.
     function OnInspectorGUI () 
     {
         Manager = FindObjectOfType(QuestManager);
         EditorGUIUtility.LookLikeInspector();
         EditorGUIUtility.LookLikeControls();
         EditorGUILayout.Space();
         
         target.QuestCode = EditorGUILayout.TextField("Quest Code:", target.QuestCode);
         target.QuestOrder = EditorGUILayout.IntField("Quest Order:", target.QuestOrder);
         
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         
         target.QuestTitle = EditorGUILayout.TextField("Quest Title:", target.QuestTitle);
         EditorGUILayout.LabelField("Quest Objective (Short):");
         target.QuestObjective = EditorGUILayout.TextArea(target.QuestObjective, GUILayout.Height(30));
         EditorGUILayout.LabelField("Quest Description/Story (Long):"); 
         target.Description = EditorGUILayout.TextArea(target.Description, GUILayout.Height(80));
         target.UseScrollView = EditorGUILayout.Toggle("Use Scroll View:", target.UseScrollView);
         if(target.UseScrollView == true)
         {
             target.ScrollLength = EditorGUILayout.IntField("Scroll View Length", target.ScrollLength);
         }  
         target.ShowAfterFinished = EditorGUILayout.Toggle("Show When Completed:", target.ShowAfterFinished);
         if(target.ShowAfterFinished == true)
         {
             EditorGUILayout.LabelField("Completed Quest Message (Short):");
             target.FinishedQuestMessage = EditorGUILayout.TextArea(target.FinishedQuestMessage, GUILayout.Height(30));
         }    
         EditorGUILayout.LabelField("Speech Audio:");
         EditorGUIUtility.LookLikeInspector();
         target.Speech = EditorGUILayout.ObjectField(target.Speech, typeof(AudioClip)) as AudioClip;
         EditorGUIUtility.LookLikeControls();        
          
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         
         target.QuestGiverName = EditorGUILayout.TextField("Quest Giver Name:", target.QuestGiverName);
         EditorGUILayout.LabelField("Quest Giver Image:");
         EditorGUIUtility.LookLikeInspector();
         target.QuestGiverImage = EditorGUILayout.ObjectField(target.QuestGiverImage, typeof(Texture2D)) as Texture2D;
         EditorGUIUtility.LookLikeControls();
         
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         
          
         var Condition : SerializedProperty = serializedObject.FindProperty("Goal");
         Condition.arraySize = EditorGUILayout.IntField("Condition(s):", Condition.arraySize);
         serializedObject.ApplyModifiedProperties();
         if(Condition.arraySize < 1) Condition.arraySize = 1;
         
         if(Condition.arraySize >= 1)
         {
         
         for(var i : int = 0; i < Condition.arraySize; i++)
         {
             var x =  i + 1;
             EditorGUILayout.LabelField("Condition " + x.ToString() + ":");
             EditorGUILayout.LabelField("Condition Type:");
             target.Goal[i].Type = EditorGUILayout.EnumPopup(target.QuestTypes, target.Goal[i].Type);
             target.Goal[i].Message = EditorGUILayout.TextField("Condition Message: ", target.Goal[i].Message); 
             if(Manager.QuestStyle == 1)
             {
                 EditorGUILayout.LabelField("Objectif Icon:");
                 EditorGUIUtility.LookLikeInspector();
                 target.Goal[i].Icon = EditorGUILayout.ObjectField(target.Goal[i].Icon, typeof(Texture2D)) as Texture2D;
                 EditorGUIUtility.LookLikeControls(); 
             }
             if(target.Goal[i].Type == 0)
             {
                 target.Goal[i].Destination = EditorGUILayout.Vector3Field("Destination:",target.Goal[i].Destination);
                 target.Goal[i].TimeToStay = EditorGUILayout.FloatField("Time To Stay:",target.Goal[i].TimeToStay);
             } 
             else if(target.Goal[i].Type == 1 || target.Goal[i].Type == 3)
             {
                 target.Goal[i].ItemName = EditorGUILayout.TextField("Item/Target Name:", target.Goal[i].ItemName);
                 target.Goal[i].AmountRequired = EditorGUILayout.IntField("Amount:", target.Goal[i].AmountRequired);
             } 
             else if(target.Goal[i].Type == 2)
             {
                 EditorGUILayout.LabelField("Quest Giver To Meet:");
                 EditorGUIUtility.LookLikeInspector();
                 target.Goal[i].Target = EditorGUILayout.ObjectField(target.Goal[i].Target, typeof(Quest)) as Quest;
                 EditorGUIUtility.LookLikeControls();
                 EditorGUILayout.LabelField("Message On Arrival:");
                 target.Goal[i].ArrivalMessage = EditorGUILayout.TextArea(target.Goal[i].ArrivalMessage, GUILayout.Height(30));
             }   
         }
         
         }
 
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         EditorGUILayout.Space();
         
         target.ReturnToGiver = EditorGUILayout.Toggle("Return To Quest Giver:", target.ReturnToGiver);
         target.RewardPlayer = EditorGUILayout.Toggle("Reward Player:", target.RewardPlayer);
         if(target.RewardPlayer == true)
         {
             target.XP = EditorGUILayout.IntField("XP:", target.XP);
         }    
         EditorGUILayout.LabelField("Reward Item: Requires S-Inventory");
         EditorGUIUtility.LookLikeInspector();
         target.Item = EditorGUILayout.ObjectField(target.Item, typeof(GameObject)) as GameObject;
         EditorGUIUtility.LookLikeControls();
     }
 }
Comment

People who like this

0 Show 2
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 rutter · Aug 12, 2014 at 08:02 PM 1
Share

Do you have two scripts named "Quest"? If so, you might want to rename one of them.

If that's not the problem, it would help if you included the full text of your compiler error, as it indicates a specific file and line number.

avatar image Kiwasi · Aug 12, 2014 at 09:27 PM 0
Share

Ambiguous comes up when the complier can't figure out what you are talking about because two methods have similar or identical signatures.

However I can't see one in this script.

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

C# Script error (error CS8025: Parsing error) 0 Answers

New sprites in 2D projects only? Cannot add in 3D project 0 Answers

Assets\Scenes\Player.cs(6,12): error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?) 1 Answer

Unity Projects 01 Stealth - problem! 1 Answer

Could not start compilation, Win32Exception 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