Page 1 of 2

ES3 Playmaker workflow

Posted: Sun Apr 15, 2018 8:07 am
by nFighter
I thought it should be clear, but I stuck and need some guidance - how exactly ES3 file save and playmaker should work?

1. I create a SaveFile.es3 with ES3 File Create action and it returns me an ObjectVariable. With this variable I could address this file later. It's clear.
Also, this action also have an option to "sync file with storage". What is "storage"? But nevertheless, let's continue...

2. I can write to file a string using ES3 File Save action and ObjectVariable I get from the creating file. Perfect!
3. I can read my string from file using ES3 File Load. Excellent!
4. Let's check, if the file exist? Action File Exist says file not exist, but didn't we just read from it? What does it mean?
5. Ok. Let's restart and read from saved file once again... And, I don't see any option to do that. I need an ObjectVariable to address a file, but how can I get one?
6. I can create file once again and upload it to the cloud. And download it. But I still can't have any ObjectVariable to link a file...

So, what am I missed? How it supposed to work?

Re: ES3 Playmaker workflow

Posted: Sun Apr 15, 2018 10:15 am
by Joel
Hi there,

If you want to save and load immediately to a file, you should use the ES3 Save and ES3 Load actions. These actions will automatically create the file if it doesn't exist.

The ES3File actions are intended for caching data, so you need to call the Sync File with Storage action for data to actually be committed to file.

All the best,
Joel

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 1:03 am
by nFighter
Thank you! Now It makes more sense to me ;)

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 1:57 am
by nFighter
Ok, I almost done. Need some more help

I create a file in my persistent data folder, fill it with all kind of data and keep it path in a string variable.

1) How should I save this file in web?
2) How can I get my data back from the web?

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 7:28 am
by Joel
Hi there,

First you will need to install the PHP file and MySQL tables on your server using the installation instructions here.

Then you can use the ES3 Cloud Upload File action to upload a local file to the server, and the ES3 Cloud Download File action to download it from the server to a local file.

All the best,
Joel

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 1:33 pm
by nFighter
That's exactly how I thought it should work. But when I ask ES3 Cloud Upload File to upload file with specified "path" - it gave me error:

FileNotFoundException: Could not find file "C:\Users\****\SaveData.es3"

So it require some default file to work, I suppose...

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 1:41 pm
by Joel
Hi there,

Would you be able to try using the PlayMaker action I'm about to PM you? This sounds like this could be a bug fixed in the upcoming version.

All the best,
Joel

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 2:16 pm
by nFighter
Hm, now something goes wrong from the other side.

When I run ES3 Cloud Upload File it erase my data file and fill it with this:

Code: Select all

	<div style="font-family:Arial, Helvetica, sans-serif">
			<h1>ES3 Cloud Installation</h1>
			<p>This will install the ES3 Cloud tables on your MySQL database, and add the required <em>ES3Variables.php</em> file to your server.</p>
			<p><strong>Please enter your database details below:</strong></p>
			<p>
				<form method="post">
					Database Host:<br>
					<input type="text" name="dbHost">
					<br>
					<br>
					Database User:<br>
					<input type="text" name="dbUser">
					<br>
					<br>
					Database Password:<br>
					<input type="password" name="dbPassword">
					<br>
					<br>
					Database Name:<br>
					<input type="text" name="dbName">
					<br>
					<br>
					<button type="submit" style="font-size:14pt; font-weight:bold;">Install ES3Cloud</button>
				</form>
			</p>
			</div>
Obviously, I already install ES3Cloud.php before. Got my API and tables in database was created.

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 2:30 pm
by Joel
Hi there,

I've not seen this happen after the database has already been installed before. It will only show the installation screen if the ES3Variables.php file does not exist alongside the ES3Cloud.php file on your server.

Would you be able to check on your server that the ES3Variables.php file exists in the same directory as your ES3Cloud.php? If this does not exist, could you go through the installation again and see if it is created?

If you PM me the URL to your ES3Cloud.php file I'll be happy to look into it myself also.

All the best,
Joel

Re: ES3 Playmaker workflow

Posted: Mon Apr 16, 2018 2:41 pm
by nFighter
No, ES3Variables.php does not exist.
I run the ES3Cloud.php , enter my details and got response:

Code: Select all

Successfully installed ES3Cloud
IMPORTANT:
Please take note of your API key below. You will need to use it whenever using the API.
Your API key can also be found in the ES3Variables.php file which has just been installed.
API Key: ******
I can see es3cloud table added to my database, but ES3Variables.php did not appear.