Back to Recipes Homepage
recipe picture
Recipe: version print
Created by brgreening 51 1376
Your rating: None


Name: version print
ID: 47844
Created on: Mon, 01/20/2014 - 15:17
Updated on: Thu, 01/23/2014 - 03:58

this prints the Lua Version

Best For


Joined: 07/21/2013
Groups: Beta Folders
Do not run this Lua script. It will crash Foldit

This script is to demonstrate that an invalid argument to the "%Q" ) statement in a Lua script or attempting to divide by zero in a Lua script will crash Foldit. I was running Foldit under Windows 8. I would be interested in
what this script does in Linux or on a Mac.

Current Foldit uses Lua 5.1.

I downloaded Lua 5.2 and ran it using Windows Lua compiler. The errors seem to be handled better there. It prints out an error message rather than crashing.

Joined: 07/21/2013
Groups: Beta Folders
The software

The software release,
Fixed these bugs.

Lua Version: Lua 5.1
Foldit run on this date: 08/11/14 15:29:58
Valid table index: 902
Invalid table index: nil
Valid argument for Lua works 15:29:58
Doing divide with non-zero divisor: 0.33333333333333
Attempting divide with zero divisor: 1.#INF
Invalid argument for Lua 15:29:58

a recipe called “version print” has been created to test these functions

There is no indication as to where the error occurred. Lua is compiled into a series of function calls when executed. Something like “Divide by zero in function check_helix + 128 “ would be nice.

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





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