Closed btburbank closed 11 years ago
name is an arbitrary variable name i made to refer to something else, its also local to only that function. try this instead
bot.getProfile(data.userid, function(data2)
{
bot.speak('@' + data2.name + ' Went to Jared! <3');
/*
data2 is just a name i chose, and .name is a field in the callback object
you can only access it within the callback function
*/
});
to see all the options in the callback function try adding console.log(data2); underneath bot.speak
And I'd put that directly after whoSnagged += 1; ?
yes
Added this: "bot.speak('@' + name + ' Went to Jared! <3');" to whoSnagged += 1; ...
Reports wrong user who snagged.