Page 1 of 1

#Const UPDATE_URL not updating

Posted: 28 Oct 2016, 22:19
by Florenzius
Hey there,

For my snow-pack i got a script for the main-menu by guerro. Sadly I have a problem there.

So it's a really easy-built news-system what he made in 3mins xd
It's implemented in my Changelog-Page in the script part. On this page are three labels. One for the title, subtitle and body.
These 3 labels are only placeholders for size, formatting ans position. The script takes these labels and puts values from a xml at text into it. The changelog-xml is that one ( http://www.florenzius.de/changelog.xml )
So it puts the three labels into the placeholders. And it works fine. The only prob is, when i update my xml on my ftp with new content (or different text), it doesn't update directly... In the interface-designer-preview it's updated directly. In the tp not. Game restarting, updating tp, clearing cache or switching tp doesn't help. I already chatted with dommy and he said that I could add "False" to line 45

Code: Select all

declare urlContent = Http.CreateGet(UPDATE_URL, False);
, so it doesn't add the text to cache, but it didn't help at all.
So after 60 or more minutes it worked somehow (but it was random).


Is the script slow at all or what could be the problem? Could some1 look over it? I need to have it until halloween ^^

Ask me via PM here for the script (i don't want to publish it here)

Re: #Const UPDATE_URL not updating

Posted: 28 Oct 2016, 23:33
by maxi031
You can try to use different xml link each time so you avoid cached version of xml.
Example:

Code: Select all

declare Text URL = " http://www.florenzius.de/changelog.xml?" ^ now;

Re: #Const UPDATE_URL not updating

Posted: 29 Oct 2016, 08:02
by Florenzius
Ty for the answer.

That's the line which shall replace the#const line?

If I have to change the path everytime in the menuscript, i have to update the pack... So a live-updating Blog would be useless. The. I could change the Text everytime in the interface Designer

Did I understand correctly? xD

Re: #Const UPDATE_URL not updating

Posted: 29 Oct 2016, 12:26
by maxi031
In your case it could be implemented like this:

Code: Select all

declare urlContent = Http.CreateGet(UPDATE_URL ^ "?" ^ now, False);

Re: #Const UPDATE_URL not updating

Posted: 29 Oct 2016, 12:30
by Dommy

Code: Select all

CHttpRequest CreateGet(Text Url, Boolean UseCache)
Putting False as second param should slways disable cache, at least it does in my projects, like exchange.

Take a look at the source code of exchange manialink:
view-source:http://dominolink.aq.pl/manialinks/exchange.php

Re: #Const UPDATE_URL not updating

Posted: 29 Oct 2016, 14:05
by maxi031
I don't know what could be the case but this looks to me like he is getting cached version of the file for some reason.
It could be that exchange xml is created dynamically while in this case this is fixed xml file.

Re: #Const UPDATE_URL not updating

Posted: 31 Oct 2016, 13:52
by maxi031
Did you fix this problem?

Re: #Const UPDATE_URL not updating

Posted: 31 Oct 2016, 13:56
by Florenzius
Ah no, but it's no problem ^^