Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Im mr.errors :( (error CS0103)

Discussion in 'Scripting' started by khalilm376447, Mar 30, 2023.

Thread Status:
Not open for further replies.
  1. khalilm376447

    khalilm376447

    Joined:
    Mar 2, 2023
    Posts:
    18
    using UnityEngine;
    using System.Runtime.InteropServices;
    using UnityEngine.UI;
    public class Link : MonoBehaviour
    {
    public void OpenLinkJSPlugin()
    {
    #if !UNITY_EDITOR
    openWindow(Field.text);
    #endif
    }
    [DllImport("__Internal")]
    private static extern void openWindow(string url);
    }
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    33,602
    At this point you are repeatedly violating forum rules by REFUSING utterly to format your code and also refusing to fix your own typing mistakes.

    Go back to all of our replies to you so far (there are many), and read the reply.

    Just in case you are unable to do that, I'll post it again for you here:

    Remember: NOBODY here memorizes error codes. That's not a thing. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.

    The complete error message contains everything you need to know to fix the error yourself.

    The important parts of the error message are:

    - the description of the error itself (google this; you are NEVER the first one!)
    - the file it occurred in (critical!)
    - the line number and character position (the two numbers in parentheses)
    - also possibly useful is the stack trace (all the lines of text in the lower console window)

    Always start with the FIRST error in the console window, as sometimes that error causes or compounds some or all of the subsequent errors. Often the error will be immediately prior to the indicated line, so make sure to check there as well.

    Look in the documentation. Every API you attempt to use is probably documented somewhere. Are you using it correctly? Are you spelling it correctly?

    All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don't have to stop your progress and fiddle around with the forum.

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    This is the bare minimum of information to report:

    - what you want
    - what you tried
    - what you expected to happen
    - what actually happened, especially any errors you see
    - links to documentation you used to cross-check your work (CRITICAL!!!)

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/

    You may edit your post above.
     
    Bunny83 likes this.
  3. khalilm376447

    khalilm376447

    Joined:
    Mar 2, 2023
    Posts:
    18
    bro its just a script error
     
  4. Bunny83

    Bunny83

    Joined:
    Oct 18, 2010
    Posts:
    3,136
    How is that relevant? It's not that hard to press the "Insert Code" button when you insert code, really.
     
    Kurt-Dekker likes this.
  5. khalilm376447

    khalilm376447

    Joined:
    Mar 2, 2023
    Posts:
    18
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,827
    Closing lazy, low effort post. Please read the rules before posting and use the search to find answers to basic questions.
     
Thread Status:
Not open for further replies.