Announcement

Collapse
No announcement yet.

Loading External Variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Loading External Variables

    I've been away from UScript for a long time. One thing I wanted to do way back in the day was load variables in from an external source. There was a way to call a web page and then parse the page, but it was very tedious as UScript didn't have much of any string functions. What changes have been put in in this area? Is there a way to pull in variables from an external source/server now? Have the string functionality been improved?

    Thanks for the help:

    -SkileSare

    #2
    I'm fairly new to uscript but there is a way to load values from a config file:

    Code:
    class child extends object
    	config(configuration_file_name_)
    	perobjectconfig;
    //work on each objected and work with a configuration file
    
    
    var config byte/int/string/float/bool/whatever variable_name
    //create variables
    
    function CreateDataStruct(out child Data)
    {
    	Data.variable_name = variable_name;
    }
    //write to data file your values
    
    function CopyDataFrom(child Data)
    {
    	variable_name = Data.variable_name;
    }
    //read from config file your values
    I'm not sure about html though

    Comment


      #3
      You need to use a TCPLink. If you want to get something off the web there is a UScript http system that El_Muerte made. It's called libHTTP and it's on the wiki somewhere.

      Comment

      Working...
      X