#Const UPDATE_URL not updating

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

#Const UPDATE_URL not updating

Post 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)
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: #Const UPDATE_URL not updating

Post 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;
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: #Const UPDATE_URL not updating

Post 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
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: #Const UPDATE_URL not updating

Post by maxi031 »

In your case it could be implemented like this:

Code: Select all

declare urlContent = Http.CreateGet(UPDATE_URL ^ "?" ^ now, False);
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Dommy
Translator
Translator
Posts: 1866
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: #Const UPDATE_URL not updating

Post 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
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: #Const UPDATE_URL not updating

Post 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.
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
maxi031
Posts: 378
Joined: 17 Jul 2011, 00:55

Re: #Const UPDATE_URL not updating

Post by maxi031 »

Did you fix this problem?
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO
User avatar
Florenzius
Translator
Translator
Posts: 2535
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: #Const UPDATE_URL not updating

Post by Florenzius »

Ah no, but it's no problem ^^
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest