is it possible?
i'm making a text based RPG and need to save a lot of variables
i have a cookie to save the current city that you're in. this is it
Code:
function save(){
d=new Date();
d.setFullYear(d.getFullYear() + 1);
expires="expires=" + d.toGMTString();
document.cookie="currentcity=" + currentcity + "; " + expires;
}
function load(){
cookies=document.cookie;
startpos=cookies.indexOf("currentcity") + 12;
endpos=cookies.indexOf(";",startpos);
if (endpos==-1) endpos=cookies.length;
currentcity = cookies.substring(startpos,endpos);
}
there is a limit of 20 cookies per domain
is there any way i could also add other values to this cookie?
i need to be able to save:
currentcity
maxhealth
health
strength
defence
exp
expntl
gold
mname
mhealth
mstrength
mdefence
mgold
mexp
level
currentmonster
quest
thats under 20, but i may need to add more. also, having that many cookies would be hard to manage
any help would be greatly appreciated