ID:1001856
Oct 3 2012, 4:30 pm
|
|
I can make the list. However, I've had trouble with the savefile. How do I save a list to a savefile and then re-extract th elist back out?
|
Oct 3 2012, 5:00 pm (Edited by moderator on Oct 3 2012, 8:00 pm)
|
|
It's pretty much how you save any variable:
|
I want to save ckey, client.address and client.computer_id to it. Also, I tried L_A's code snippet, but for some reason it didn't work.
|
Don't copy and paste... He has pasted the code snippet and it has an indentation issue... Learn from the code don't just copy it...
|
And I've tried to. The only problem I'm having here is storing the list in a savefile, then extracting it out again. Of all the methods I've tried, 1 of 2 things happens each time:
-I receive a runtime error saying it can't find the list. -It just doesn't work. I didn't exactly copy/paste either. I changed all the variables to mine and tried to analyze which line of code does what. For some reason, storing and extracting lists isn't as easy as variables. |
LordAndrew provided the solution for saving and loading a list into a savefile.
|
I changed all the code to match my list. If I were to change anything else then it would no longer be what he's provided me with. So why would I edit beyond what I did. If I did then I might as well be going "nah I don't need that, I'll just change it to what I think it should be." Doesn't that kind of defeat the purpose of asking for help?
|
There's a difference between getting help and just plain out copying it and changing some variables ...
|
And I'm asking you what the difference is. I posted here asking for help on how to store and extract lists from savefiles. L_A showed me with a snippet, and I tried using that snippet. I looked at the codes. I do think it looks weird, as if it's copying itself into itself or something. That's what I'm trying to understand. I've tried saving lists in the same way you save variables, but I keep getting 1 of the 2 problems I listed above.
|
I didn't see LordAndrew's original code so I'm guessing that it was not initialized (banned list is null). Then, you saved that null value and you kept loading that. Delete ban.sav then try again.
As for what ATHK was saying, if you copy and paste a code from the forum, you'll get indentation errors because the tabs are being replaced by spaces. |
I replace the spaces with tabs. And I have codes made so that information (ckey, client.address, client.computer_id) gets saved to it. The only problem is the savefile storage/extraction itself. I'm not sure what's going wrong with it.
I'm not copy/pasting. I have the list and its storing all ok. I tried storing/extracting it from the savefile using the codes above. It didn't work. |
world |