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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Having a hard time trying to get this script to work.

Discussion in 'Scripting' started by killhead98, May 11, 2014.

  1. killhead98

    killhead98

    Joined:
    Oct 17, 2012
    Posts:
    25
  2. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    What's not working exactly?
     
  3. killhead98

    killhead98

    Joined:
    Oct 17, 2012
    Posts:
    25
    Well. It tells me I need to set something up but I'm having a hard time to do so. And I'm not sure how to put this together.
     
  4. killhead98

    killhead98

    Joined:
    Oct 17, 2012
    Posts:
    25
    This is what I mean, I can't get this to work.

     
    Last edited: May 11, 2014
  5. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    You need to give us more details. What is this 'something' that you need to set up? Does the console give you any error messages, or warnings, anything?

    Give us a detailed description of what is happening. Type out the exact error message here
     
  6. killhead98

    killhead98

    Joined:
    Oct 17, 2012
    Posts:
    25
    Yes it does. It fals to run
     
  7. Bivrost

    Bivrost

    Joined:
    Mar 26, 2014
    Posts:
    80
    Please use code tags when posting code. Read THIS.
     
  8. Bivrost

    Bivrost

    Joined:
    Mar 26, 2014
    Posts:
    80
    There's a blank where there shouldn't be one:

    Code (csharp):
    1.  
    2. VPosition=new Vector3(myData._iUser.x,myData._iUser.y,myData._iU ser.z);
    3.  
     
  9. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
    From what I am gathering, I figure you don't know how to debug code. (which is 99% of your problem) Your expecting others to "figure this out" when your not willing to commit the time to learn the proper way to code and debug.

    its a harsh reality. My suggestion is to read what these are and test each one with what is happening in the script:
    Code (csharp):
    1.  
    2. using System.Xml;
    3. using System.Xml.Serialization;
    4. using System.IO;
    5. using System.Text;
    6.  
    I will tell you from experience, Xml and Xml.Serialization read and write XML files. (An XML file is a text based file that uses tags to define structures of data. It is very similar to HTML, or web sites.)

    System.IO is the input and output stuff for .net. This is what will read and write files as well as directories and other stuff.

    System.Text is the portion that helps decode ASCII and Unicode stuff. It would help greatly in dealing with XML files.

    Your task is to NOT, just use what someone else did, but to work on each of these and figure out what they do, and how to use them together. Remember, 99.9% of all programming is debugging, so learn how to do that as well.
     
  10. killhead98

    killhead98

    Joined:
    Oct 17, 2012
    Posts:
    25
    Thanks for you help! I have found away of getting it to work. Tan