Issues with Var access in Developer Help
|
|
Code:
mob Login() client.mob = new /mob/player var/client/mob/currentCash var/client/mob/currentName var/client/mob/currentRank var/client/mob/currentBranch proc createData(ckey) var/savefile/F = new("" + ckey + ".sav") F["cash"] << 0 F["name"] << "" F["rank"] << 0 F["branch"] << 0 saveData(ckey, client) var/savefile/G=(""+ckey+".sav") G["cash"] << currentCash G["name"] << currentName G["rank"] << currentRank G["branch"] << currentBranch loadData(ckey, client.mob) var/savefile/E=(""+ckey+".sav") E["cash"] >> currentCash E["name"] >> currentName E["rank"] >> currentRank E["branch"] >> currentBranch
|
Problem description:
FOR STARTERS, DO NOT CALL ME A NOOB. If your angry and just wish I'd get the clue, don't help me. I don't need the attitude. But the problem is, that I'm having issues accessing vars. Above is my code, and what I can't seem to figure out is how I can access the variables assigned at login. Can anyone please shed some light on the situation.
|
Also realize that by changing client.mob, the current mob will no longer be src (because you've changed which mob is theirs), and Login() for the NEW mob will be called.