esx_invest
esx_invest copied to clipboard
[Version] Nil version fetched from checkVersion method
Hi,
The PerformHttpRequest("https://raw.githubusercontent.com/"..updatePath.."/master/version", checkVersion, "GET")
doesn't seem to fetch any version because at the following line we got an error.
if tonumber(curVersion) < tonumber(responseText) then
got : 1.2.5 < nil
You can ask me more about it if needed. Respectfully
🤔 well this is it what should fetch https://raw.githubusercontent.com/Tazi0/esx_invest/master/version
I have no idea why it wouldn't work... can you check if updatePatch
is correct to "Tazi0/esx_invest"
Yup it is, I just took the latest version of Master
May be because I'm running actually on my Localhost server ?
Update : The function on line 11
function checkVersion(err,responseText, headers)
takes as a 1st parameter err which is actually the response code.
I got 1.2 on 2nd param which is correct :)
However I misunderstood something, it's the tonumber(curVersion)
So the problem is it tries to convert tonumber(1.2.5)
May be because I'm running actually on my Localhost server?
my test server is local so I don't think
[...] takes as a 1st parameter err which is actually the response.
If the request was successful it would return 200 and response would be the version
(Sorry I edited my previous post)
So the problem is it tries to convert tonumber(1.2.5)
I've done tests and your correct, apparently I can't do 2 dots... great (no more half updates ig)
Roger that, otherwise you could split your string with 3 variables with Major / Minor / patch and compare them ?
i could but it isn't that important, ill put it on a low