Jump to content
  • 0

Help With Script


Pyxe

Question

7 answers to this question

Recommended Posts

Bump (i still havent figured out)

_______________________________________________
added 0 minutes later

For changelog, i want one like gameguardian, when you start up gameguardian it pops up 'new version available'

Link to comment
Share on other sites

1 minute ago, ForbiddenSaga said:

You need webserver to do this.
Without a web server it's impossible to check for a new version.

For Device ID/IMEI it's impossible to get with LUA, you need to develop your own methods to recognize the device.

I do have my own webserver and what about linux version?

_______________________________________________
added 1 minute later

And how would i do the new version? Like is there an example or what? Sorry im so terrible at lua scripting. 

Link to comment
Share on other sites

Then just use gg.makeRequest to withdraw information from webserver and pass it to your lua, for example

local current_version = "1.0.0"
local server_version = gg.makeRequest(http://localhost/version.txt).content

if (current_version ~= server_version) then
  gg.alert("New version is found, please re-download from http://localhost")
end


It's impossible to get any sort of info if it's not on a file on the user device.
I don't know how android works so i never explored it.

But if it's on a file, you might try doin io.open and then read the file.

Link to comment
Share on other sites

Just now, ForbiddenSaga said:

Then just use gg.makeRequest to withdraw information from webserver and pass it to your lua, for example


local current_version = "1.0.0"
local server_version = gg.makeRequest(http://localhost/version.txt).content

if (current_version ~= server_version) then
  gg.alert("New version is found, please re-download from http://localhost")
end


It's impossible to get any sort of info if it's not on a file on the user device.
I don't know how android works so i never explored it.

But if it's on a file, you might try doin io.open and then read the file.

Thank you! Where would i be without you. ?

Link to comment
Share on other sites

All this is possible with pastebin, no need to use your webserver

just do 

version_client = "1.0.0"
version_latest = gg.makeRequest("http://pastebin.com/raw/PUT_ID_HERE").content

if (version_client ~= version_latest) then
  -- Tell user he/she is not on latest version
end

Also credits to ForbiddenSaga for basic structure

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.