UE2 - UT2kX Reading from files

  • 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.

AJRAD

{[RTW]} Leader
Sep 27, 2005
37
0
0
you tell me
rtw.havokwh.com
Ok... another dodgy area.
Yep I searched the wiki and the whole internets for like 2 hours and I've found nowt.
So...

Is there a built in way that I can read a text file into unrealscript as a string so I can do further stuff to it?
Like.. the file would be on the server in the system folder, I just want ut2004 to read it and put the contents in a variable.

I was thinking of just writing a quick C++ function to do it natively but the mod this is a part of needs to be downloadable by clients, and I don't think DLLs are downloaded (are they?)

Thanks in advance for any help at all.
 

AJRAD

{[RTW]} Leader
Sep 27, 2005
37
0
0
you tell me
rtw.havokwh.com
Yep I know about inis, its just that I've already written a script that procsses the file my way, and I need to load it in unrealscript so I can send it to my webserver (using LibHTTP and I've got that bit working btw).
 

Continuum

Lobotomistician
Jul 24, 2005
1,305
0
0
43
Boise
You could create a listen/server socket (apache/http would probably have quite a bit of overhead in the http response but could probably work as well) in an external application and use the TCP client to make calls / receive the response stream (the text of your file). A bit more involved than just reading in a file but definatley doable, guess it depends on how efficient it needs to be also. It may be more efficient to process the file outside uscript.

http://wiki.beyondunreal.com/Legacy:Creating_A_TCP_Client