Back to Recipes Homepage
recipe picture
Recipe: version print
Created by brgreening 76 1327
0
Your rating: None

Profile

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

this prints the Lua Version



Best For


Comments

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 os.date( "%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,
20140811-46cd6bb2fb-win_x86-devprev,
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 os.date() works 15:29:58
Doing divide with non-zero divisor: 0.33333333333333
Attempting divide with zero divisor: 1.#INF
Invalid argument for Lua os.date() 15:29:58

http://fold.it/portal/recipe/47844

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.
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, RosettaCommons