Login to game before start

Get help using Construct 2

Post » Sat Jan 05, 2013 6:54 am

login event
https://www.dropbox.com/s/iphcwasoy533ewc/Login%20Event.jpg

main event
https://www.dropbox.com/s/i38aul1bbxaev2f/Main%20Event.jpg

register event
https://www.dropbox.com/s/sfxntfq0smhivy6/Register%20Event.jpg

register.txt (php)
https://www.dropbox.com/s/iebmfl91ywp5qoc/register.txt

login.txt (php)
https://www.dropbox.com/s/rc9jkontocamlvr/login.txt

hope you can help it
B
3
Posts: 5
Reputation: 285

Post » Sat Jan 05, 2013 3:30 pm

@george

I see what you mean. I have the same error on my end. I think I have a way of fixing it by assigning the error given by the php else statement. Will post when I have it done.
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Sat Jan 05, 2013 3:52 pm

@shoesims

Your login event is duplicating the ajax login call.

Basically you have the system making an ajax request each time the ajax request is completed causing it to endlessly loop.

(ie) Run ajax request -> on completed -> run ajax request -> on completed...

and on and on until infinity.

Remove the second Ajax request under the event On Login Completed. ( Ajax -> http://localhost/avibppt/test/login.php?username="& UsernameTxt2.Text & "&password=" & PasswordTxt2.Text)
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Sat Jan 05, 2013 4:01 pm

@shoesims

You have the same issue on the register event. Remove the ajax request under on ajax completed.
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Sat Jan 05, 2013 4:06 pm

okay, I'll try it, thanks for your solution
B
3
Posts: 5
Reputation: 285

Post » Sat Jan 05, 2013 4:16 pm

Sorry, there is wrong picture for the register event on the.capx, this is the right one

https://www.dropbox.com/s/sfxntfq0smhivy6/Register%20Event.jpg?m

I have to disabled the "ajax -> on register completed/ on register error" as if the register is successful, if I don't do toggle disabled, it will show the "ajax -> on register error"
B
3
Posts: 5
Reputation: 285

Post » Sat Jan 05, 2013 5:30 pm

@george

Here is the fix.

Step 1. Modify your login event sheet to look like this:



login event fix

Step 2: Replace login.php with this version: login.php

Should work like a charm.
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Sun Jan 06, 2013 2:55 am

@droptank21

It doesn't work :(
B
3
Posts: 5
Reputation: 285

Post » Sun Jan 06, 2013 8:00 pm

Did you make sure to modify the sql info to match your database?
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Mon Jan 07, 2013 7:37 am

@droptank21,

Its not working on my side. I change the login.php and also the events but its not working.
B
11
S
3
G
2
Posts: 40
Reputation: 2,362

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Callan S, getplay, Kagubro and 26 guests