Js sdk not working

Hello, im VERY new to the js sdk, only just getting started. I have this js code
http://pastebin.com/nbRm4cRS
When ran, it does not output the stream key of my channel instead it gives this:

Uncaught TypeError: Cannot call method 'done' of undefined twitch.min.js:2
Twitch.api twitch.min.js:2
(anonymous function) TRoundAbout.js:21
getStatus twitch.min.js:2
(anonymous function) TRoundAbout.js:19
(anonymous function) jquery.min.js:19
o.extend.each jquery.min.js:12
o.extend.ready jquery.min.js:19
(anonymous function) jquery.min.js:19

How could I possibly fix this?

anyone? Or do you need to see my html aswell?

given the async nature of JS you run into a problem

you’re trying to .getStatus before the callbacks for Twitch.init occur

that’s why it’s undefined (probably)

Ahah. Is there a (simple) way to prevent this from happening?

any idea then? or no?

Or perhaps I should call the Twitch.api({method:‘channel’}, function(error, channel) {
int the curly braces of Twitch.init? as the last thing?

EDIT: dang its in ther already :smiley: derp
edit: derp, it aint

Anyone? I have ran out of ideas of what else to try here…

Here how i inits the twitch api:

Twitch.init({clientId: 'YOURAPPTOKEN'}, function(error, status) {

You can get app token from here http://ru.twitch.tv/settings/connections ‘Register your application’ button.

… the problem isnt that… :D, see the code

SOLVED! was using an old version of JQuery, derp

what version of JQuery? I’m having the same problem