Back to Recipes Homepage
recipe picture
Recipe: Cooks Only: Save/Load snips
Created by Jean-Bob 60 2065
4.666665
Your rating: None Average: 4.7 (3 votes)

Profile

Name: Cooks Only: Save/Load snips
ID: 45154
Created on: Wed, 01/09/2013 - 19:03
Updated on: Thu, 01/10/2013 - 03:03
Description:

A set of functions to concatenate an array in a string and restore such a "stringed" array. See comments.



Best For


Comments

Joined: 08/24/2011
Comment

That's a bit dirty but it's the only way I found to pause a running script (see feedback Cookbook - "pause" function). I store the data I need i an array that I concatenate with this function and store it in the note of a segment. The function RebuildArray emulates someway the core function loadstring().

See also feedback Recipe buffer + loadstring() core function

Joined: 09/18/2009
Groups: SETI.Germany
;)

Dirty? Why?
PHP does the same, as it can paste variable-contents into the browser's address bar and fetch them back later (the $_GET-array), hehe ;)
It can also do this with HTML-formular-entries (the $_POST-array)
Moreover, it can move sign-separated strings back to an array via explode()

So, it's something similar you are doing here with Lua.
Nice work!

Joined: 09/24/2012
Groups: Go Science
First implementation

Implemented by jean-Bob here for the first time:

Ebola Rebuild>

Enjoy !

Want to try?
Add to Cookbook!
To download recipes to your cookbook, you need to have the game client running.
Parent

none

Children

none

Authors
Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons