![]() |
1 Attachment(s)
Looks like this is exactly what Alice needs, thank you! :D
EDIT: I made a simple world to test this tool. It works perfectly as far as I can tell. |
I'm getting a KeyError with it...
Error during simulation. Alice version: 2.2 12/01/2011 Throwable that caused the error: Traceback (innermost last): File "edu.cmu.cs.stage3.alice.core.property.ScriptProperty[name=script,owner=edu.cmu.cs.stage3.alice.core.response.ScriptResponse[world.saveTool.has_var.__Unnamed2__]]", line 1, in ? File "<string>", line 42, in has KeyError: Dj Tech42.License to Fly.__default |
Helpful
Any error for this FileIOTool.. I will try to download this one... thanks
|
I know I said I will be gone for a while, but I cant leave without fixing bugs in this :).
Dj Tech42, the error your getting is in a validity check I have. For every game there is a default value automatically saved upon every save that must equal "valid", under the name "__default" (please don't use any names with double underscores at the start when saving, they are reserved for use by the internal workings of the tool, I should have said that in the main post, but that is not the problem here anyway). What I should have noticed in the code is that when that value does not exist there will be an error when the code tries to get it. I've fixed it by adding my friendly dict class (a class that emulates a python dictionary, but does not throw horrible errors) that I built for Addons. [B]I've updated the top post with the new version.[/B] I hope no more bugs come up, bye for a while. |
Now I can finally make long RPGish games.
|
This is actually exactly what I was using the file I/O tool for in the first place. This looks great, thanks Arty!
|
[QUOTE=InsertName;46011]Now I can finally make long RPGish games.[/QUOTE]
I know what I'm gonna do today! |
Two questions.
Where are the saved strings and numbers placed when saved, and what does the author string change (Example, how will the result be different if I enter A for the name from the result if I enter B for the name)? |
[QUOTE=GameKid;46413]Two questions.
Where are the saved strings and numbers placed when saved, and what does the author string change (Example, how will the result be different if I enter A for the name from the result if I enter B for the name)?[/QUOTE] Two answers. The save data is stored in one file; location "[I]Alice 2.2\Required\saveToolData[/I]" (it has no extension). That file is basically a stringified python structure and therefore loads and saves nicely with python. The author string and game title string are both in place just to ensure each save variable gets a unique name and people who use the same game title don't overwrite each others saves. I may also give it other uses in the future, but for now its just an easy way to create unique save variable names. |
[QUOTE=arty-fishL;46415]Two answers.
The save data is stored in one file; location "[I]Alice 2.2\Required\saveToolData[/I]" (it has no extension). That file is basically a stringified python structure and therefore loads and saves nicely with python. The author string and game title string are both in place just to ensure each save variable gets a unique name and people who use the same game title don't overwrite each others saves. I may also give it other uses in the future, but for now its just an easy way to create unique save variable names.[/QUOTE] Can you use the author string to make profiles? (separate variables for every user playing the game) |
All times are GMT -5. The time now is 11:33 PM. |
Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.