tijny
June 27th, 2010, 10:24
i'm using afgscape 3.0 for a long time now and i still didnt have a auto char save so i made one
this is what i did:
i made a public int:
public int lastSave = 0;
i pasted that int under
public boolean adglow = false;
public boolean modglow = false;
public boolean ownerglow = false;
public boolean afkzzz = false;
public boolean darkglow = false;
it didnt gave me errors so it should be at the right place ther.
and this is the other part of the code:
if (System.currentTimeMillis() - lastSave > ####){//automatic safe
savemoreinfo();
savechar();
PlayerHandler.messageToAll = "game has been succesfully saved for all players!";
}
but i only is safing once's so i added
lastSave = 0;
like this:
if (System.currentTimeMillis() - lastSave > 2000){//automatic safe
savemoreinfo();
savechar();
PlayerHandler.messageToAll = "game has been succesfully saved for all players!";
lastSave = 0;
}
but now it still doesnt work :O it only is saving one time (at 2000 milisec) and than nothing :O
please help me to fix :P
this is what i did:
i made a public int:
public int lastSave = 0;
i pasted that int under
public boolean adglow = false;
public boolean modglow = false;
public boolean ownerglow = false;
public boolean afkzzz = false;
public boolean darkglow = false;
it didnt gave me errors so it should be at the right place ther.
and this is the other part of the code:
if (System.currentTimeMillis() - lastSave > ####){//automatic safe
savemoreinfo();
savechar();
PlayerHandler.messageToAll = "game has been succesfully saved for all players!";
}
but i only is safing once's so i added
lastSave = 0;
like this:
if (System.currentTimeMillis() - lastSave > 2000){//automatic safe
savemoreinfo();
savechar();
PlayerHandler.messageToAll = "game has been succesfully saved for all players!";
lastSave = 0;
}
but now it still doesnt work :O it only is saving one time (at 2000 milisec) and than nothing :O
please help me to fix :P