[SOLVED]Help. How to read external .txt from github

i watch how to read from text file in local file



and I want to know, how to read the txt file that is on github


I tried it but it failed.


var ASWERD = "http://raw.githubusercontent.com/bilalichwa/revillage/master/ver.txt";

var zzz = new XMLHttpRequest();

zzz.open("GET",ASWERD,false);

zzz.send(null);

var fileContent = zzz.responseText;



if(fileContent === "200") {

$gameVariables.setValue(173, 1);

}

is there a way to read the txt file from github?

thx...
In that case, "zzz.responseText" is:
Code:
"200
"

There's a new line in there somewhere, maybe a "\n" character or something. So it's not technically equal to "200".

Try:
Code:
if (fileContent.trim() === '200')
for your conditional.
In that case, "zzz.responseText" is:
Code:
"200
"

There's a new line in there somewhere, maybe a "\n" character or something. So it's not technically equal to "200".

Try:
Code:
if (fileContent.trim() === '200')
for your conditional.

Error like this ..
PoeEstx.png
YEP_CoreEngine is getting in the way.
disable it just for testing.
YEP_CoreEngine is getting in the way.
disable it just for testing.
Thanks...

its work when i disable YEP_CoreEngine..

but how is it so that the script can run with Yep_CoreEngine ?
I remove script in lane 1844-1857 YEP_CoreEngine,, and WORKS !.

// Script
Game_Interpreter.prototype.command355 = function() {
var script = this.currentCommand().parameters[0] + '\n';
while (this.nextEventCode() === 655) {
this._index++;
script += this.currentCommand().parameters[0] + '\n';
}
try {
eval(script);
} catch (e) {
Yanfly.Util.displayError(e, script, 'SCRIPT CALL ERROR');
}
return true;
};

is it ok?
can it affect other plugins or scripts if this is deleted
*looks* like it's only a control routine to report any errors to Yanfly's own engine.
should work fine without it, but you wouldn't get any reports of actual errors by Yanfly's plugins.
*looks* like it's only a control routine to report any errors to Yanfly's own engine.
should work fine without it, but you wouldn't get any reports of actual errors by Yanfly's plugins.
ok thanks....

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-help-how-to-read-external-txt-from-github.105117/