ID:270120
Jan 11 2006, 5:59 pm
|
|
Ppl, i want to know, how i make a load system that loads the same savefile on every server, for dont have players losing levels...
|
In response to Hiead
|
|
Hiead wrote:
For that, you'll want to do client-side saving(where each client has a savefile, usually of their own characters or some such). Look up Import() and Export(). wow, so fast... |
In response to Pharaoh Atem
|
|
I must've coincidentally refreshed the browser a minute after you posted. =P
Hiead |
In response to Hiead
|
|
Hiead wrote:
I must've coincidentally refreshed the browser a minute after you posted. =P mob |
In response to Pharaoh Atem
|
|
Pharaoh Atem wrote:
Whats wrong? Good gads, everything. You put usr in a proc. You're duplicating the same code in a zillion places. You have type paths set up as BG, BG2, BG3, etc. when you should only be creating a single object and letting it create all the others. You're using if(var==1) to test a true/false value instead of if(var). You have a zillion different true/false vars (CS, ZS, DS, ShS, etc.) that are obviously mutually exclusive and so should be a single var with different possible values. Before you even attempt to work with client-side savefiles, you need to fix the above. Lummox JR |
In response to Lummox JR
|
|
Lummox JR wrote:
Pharaoh Atem wrote: omg, usr in proc! but why Import() its an undefined proc? |
In response to Pharaoh Atem
|
|
Pharaoh Atem wrote:
but why Import() its an undefined proc? Well, I'd look for it, but I'd rather not spend my night hunting for a line of code mixed into a jungle of repetitious code. =/ After you fix all of the things Lummox pointed out, post your new code (mark with a comment where you want me to look for Import(), if it's still giving you problems), and I'll try to look into it. Hiead |
In response to Pharaoh Atem
|
|
Pharaoh Atem wrote:
omg, usr in proc! It's not undefined; it just doesn't belong to your mob. Mind you, Hiead said you should look up Import(), not simply plop it into your code at random. As for usr in the proc, that's a huge problem but it's actually not the worst problem. The worst problem is the organizational one I mentioned, with umpteen kazillion different vars like DS, CS, ZS, ShS, QS, NthS, and BS. If only one of those is true at a time, then obviously a single var could replace them all, with a different number--or string--for each setting. You need to fix these design flaws before you get your save system working, or else you'll end up having to wipe everything when the collapse of your code inevitably forces you to change it later. So first, deal with the problems at hand. Then look up Import() and Export(). And by "look up" I mean, as Hiead meant, you should look at Import() and Export() in the reference and examine each one, at which point you will find what you need to handle client-side savefiles. But don't do that search until you fix the rest of the problem, or you'll be loading and saving gibberish. Lummox JR |
In response to Hiead
|
|
Hiead wrote:
Pharaoh Atem wrote: mob now all ok? |
In response to Pharaoh Atem
|
|
Pharaoh Atem wrote:
now all ok? No. You still have those vars ZS, CS, DS, etc. that should all be just one var. It's crucial to fix design flaws like that before getting savefiles to work, or you'll just have to wipe your savefiles later. Lummox JR |
Hiead