mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-27 09:13:18 +00:00
check if newgroups api key actually exists before creating core
This commit is contained in:
parent
7abd7c5c2e
commit
d38323ab55
|
@ -35,19 +35,22 @@ class NGio
|
||||||
trace('INIT NOLOGIN');
|
trace('INIT NOLOGIN');
|
||||||
GAME_VER = "v" + Application.current.meta.get('version');
|
GAME_VER = "v" + Application.current.meta.get('version');
|
||||||
|
|
||||||
NG.create(api);
|
if (api.length != 0)
|
||||||
|
|
||||||
new FlxTimer().start(2, function(tmr:FlxTimer)
|
|
||||||
{
|
{
|
||||||
var call = NG.core.calls.app.getCurrentVersion(GAME_VER).addDataHandler(function(response:Response<GetCurrentVersionResult>)
|
NG.create(api);
|
||||||
{
|
|
||||||
GAME_VER = response.result.data.current_version;
|
|
||||||
trace('CURRENT NG VERSION: ' + GAME_VER);
|
|
||||||
gotOnlineVer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
call.send();
|
new FlxTimer().start(2, function(tmr:FlxTimer)
|
||||||
});
|
{
|
||||||
|
var call = NG.core.calls.app.getCurrentVersion(GAME_VER).addDataHandler(function(response:Response<GetCurrentVersionResult>)
|
||||||
|
{
|
||||||
|
GAME_VER = response.result.data.current_version;
|
||||||
|
trace('CURRENT NG VERSION: ' + GAME_VER);
|
||||||
|
gotOnlineVer = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
call.send();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function new(api:String, encKey:String, ?sessionId:String)
|
public function new(api:String, encKey:String, ?sessionId:String)
|
||||||
|
|
Loading…
Reference in a new issue