rem: localPlayer.resource.valueOf()[resourceName] = resourceQty; 
add: localPlayer.resource.valueOf()[resourceNameU] = resourceQty;  if (resourceName != "Housing") getGUIObjectByName ("snResourceCounter_" + resourceName).caption = resourceQty; 
context: function addResource (resourceName, resourceQty){	// Creates a resource type.	// MT: Rewritten to use JavaScript's nice associative-array-alikes. Requires the valueOf() hack - I'm looking into this.	if (!localPlayer.resource)	{		// Define the base resource group if it does not exist.		localPlayer.resource = new Array();	}		// Set resource name to upper-case to ensure it matches resource control name.	resourceName = resourceName.toUpperCase();	// Store resource's name and starting value.	localPlayer.resource.valueOf()[resourceName] = resourceQty;		console.write("Added " + resourceName );}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/580cbdef5256984392214ed10a0aa9260f682d48/functions_sim_player.js/clean/binaries/data/mods/official/gui/test/functions_sim_player.js