Hello!
I am new to the Parse plugin and am having some trouble with it, when I run the following code:
local parse = require( 'plugin.parse' ) parse.config:applicationId( "myId" ) parse.config:restApiKey( "myKey" ) function loginSuccess() local i = 0 ; while ( i \< 10 ) do i = i + 1 print( i ) end end local j = 10 ; print ( "Login attempt.") function networkCall() local req2 = parse.request( parse.User.login ) :options( { username = "myUserName", password = "myPassword" } ) :response(function( ok, res, info ) if not ok then print('err', res ) else if info.status == 200 then loginSuccess() end end end) end networkCall() while ( j \< 20 ) do j = j + 1 print( j ) end
It runs the while ( j < 20 ) do loop before I get the results from the networkCall function. Any ideas?
Thanks!