If the player's health is below zero, I'm reloading the last save file and getting this error:
Uncaught typeError: Cannot read property 'width' of null
script for reloading a save file:
Console:
It loads the save file only if it's the same map. How can I fix it?
UPD. It seems to be working on certain maps. Not sure why....
Uncaught typeError: Cannot read property 'width' of null
script for reloading a save file:
if (DataManager.loadGame(1))
{
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
$gamePlayer.requestMapReload();
SceneManager.goto(Scene_Map);
}
{
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
$gamePlayer.requestMapReload();
SceneManager.goto(Scene_Map);
}
Console:
It loads the save file only if it's the same map. How can I fix it?
UPD. It seems to be working on certain maps. Not sure why....