drahkar
January 9th, 2010, 20:18
Ok, I can't seem to narrow down what's wrong with this bit of code. It works the first time it inits, but when it calls using onUpdate it throws a 'attempting to set a nil value as a handler function'.
function onInit()
speciessource = window.getDatabaseNode().getChild("details.species");
speciestype = speciessource.getValue();
speciessource.onUpdate = update(speciestype, stat[1]);
update(speciestype, stat[1]);
end
Any thoughts?
function onInit()
speciessource = window.getDatabaseNode().getChild("details.species");
speciestype = speciessource.getValue();
speciessource.onUpdate = update(speciestype, stat[1]);
update(speciestype, stat[1]);
end
Any thoughts?