(UScript) Basic Functions... ?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Qjahe

New Member
Nov 15, 2003
36
0
0
Hi,

I recently got into UnrealScripting and I have a couple of questions.
What builtin basic function can I use in UScripts?

I am trying to split a string at the return character ("\n") but doesn't seem to be accepted...

Do I have to use C++ or Java functions? Both?

I was also wonderinf if it is possible to have UScript access a mySQL database directly? if so how could I protect the login / pwd of mySQL db?

Thanks for the help :)
Qjahe
 

Qjahe

New Member
Nov 15, 2003
36
0
0
More Questions

is UScript able to save some kind of settings to disk? in a new file defined by me? Settings for the Mod, so when they reopen it remembers the settings...

Can I use the current ini files and put my settings there somewhere?
if yes how do I pick them up with UScript... ?

Thanks again
Qjahe

P.S: I'm still with good old UT... not UT2003.
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
The most basic functions available are declared in object.uc and are available for any class you write. Other useful functions are declared in actor.uc which are of course available only for subclasses of actor, which will be most things.

You cannot use C++ or Java functions, although many UScript functions are similar.

Check the Wiki for more detailed information about this sort of stuff.
 

Mr Evi1

New Member
Mar 22, 2002
336
0
0
UK
come.to
I see mor equestions before I finished my reply!

For storing settings to disc, search the wiki for 'config variables'. These can be read/written from/to .ini files.
 

Qjahe

New Member
Nov 15, 2003
36
0
0
No split function found

I went to UnrealWiki and I couldn't find a split function...
Neither could I find any in Core.Object.uc, I also searched for a slice function maybe... couldn't find one...

could someone point me in the right direction?
Am I going to have to remake all the basic functions of a language? :(

Thanks for the help...

Qjahe
 

Harmeister

New Member
Mar 14, 2000
43
0
0
49
Billerica, MA
www.wotgreal.com
Qjahe said:
I went to UnrealWiki and I couldn't find a split function...
Neither could I find any in Core.Object.uc, I also searched for a slice function maybe... couldn't find one...

could someone point me in the right direction?
Am I going to have to remake all the basic functions of a language? :(

Thanks for the help...

Qjahe


um, in Object.uc there is this declaration on line 353 of the UT2k3 2225 source

Code:
native      static final function int    Split  ( coerce string Src, string Divider, out array<string> Parts );

isn't that what you are looking for?
 

Qjahe

New Member
Nov 15, 2003
36
0
0
Harmeister said:
um, in Object.uc there is this declaration on line 353 of the UT2k3 2225 source

Yeah it'd be exactly what I'd be looking for if it was in the same file for UT...

like mentionned above I dont play UT2003 anymore.. and I do UScript for UT.. well trying to...

You think there is something we could do to import it in UT?

Thanks for the help guys :)

Qjahe
 

Tynan

Person
Jan 13, 2003
130
0
0
The Gutter
www.planetunreal.com
It's a native function, so don't count on importing it.

It would seem strange for there to be no split function in UT99. If you become absolutely need it you may have to code it yourself somehow.
 

Qjahe

New Member
Nov 15, 2003
36
0
0
Dynamic Arrays...

Daid303 said:
UT doesn't have it because it doesn't have dynamic arrays ;)

I wanted to use split because I am getting some info from a file.php on my website which is returning records from a database with 1 record per line. I wanted to split at the return character "n" then split at the comma in a loop...

How can I accomplish this without a Split command? :(

I was also wondering if it was possible within UScript to access mySQL directly? I've seen suggestion to sub TcpLink and go from there. if I go in that direction how do i hide the Login / Pwd to mySQL successfully?

I'm still a n00b in UScript,
Thanks for the help :)

Qjahe