![]() |
Reading from a txt file?
Is there any function that grabs strings from a text file? I've tried looking through the -RC script, but I don't quite grasp what's going on. I just really think that having a message system that can incorporate longer messages than the server vars can handle would be really useful.
|
There exists no known means of doing this in gs1.
|
PHP Code:
--CONTENTS OF SOMETHING.TXT-- stuff=3 arf=8 hello="Hi there!" omg=Yellow,Blue,Red members.stuff would be 3 members.arf would be 8 members.hellow would be 'Hi there!' members.omg would be an array containing 'Yellow,' 'Blue,' and 'Red.' You can get the list of variables it loaded with object.getstringkeys("members"); I don't recall if you need a . after members or not. :/ |
Quote:
This post should have been in the GScript2 sub-forum, though. |
Quote:
|
Quote:
I was looking through the wiki, and I think what you might be looking for is: variable.loadlines("filename"); Graal doesn't work on my computer right now, but if memory serves me, it should be something like: HTML Code:
--levels/test.txt--PHP Code:
HTML Code:
Line 1: Testing 123 |
That indeed works. Thanks Apoth.
|
| All times are GMT +2. The time now is 04:42 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.