Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Can't get string to equal value.

Author
Message
Kobaltic
12
Years of Service
User Offline
Joined: 24th Jan 2012
Location: PA, USA
Posted: 14th Apr 2013 05:23
Using tier 1. I have a value coming back from a http request. I parse the value but it doesn't equal the string for some reason. control$ should equal 1, unless I am misunderstanding strings being equal. Thanks. Here is the code:

PHP:


AGK code:
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Apr 2013 05:43
It's not impossible that you are getting the string from the echo, plus a line that is only the carriage return.

If your PHP script has more than one final carriage return avterthe closing "?>", it could be effectively echoing your '1lease choose another name' followed by a carriage return.

Or, if there is a carriage return before the starting "<?" that could also be adding a line you weren't expecting.

In a PHP script, anything outside of the "<?" or "<?php" and "?>" will be displayed or echoed as a response. This has caused more than one problem for professionals in the field (of which I am one).

Check your PHP script. Also, try doing a message pop-up for each string returned by your script, before you manipulate it, to see what you are actually getting.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Kobaltic
12
Years of Service
User Offline
Joined: 24th Jan 2012
Location: PA, USA
Posted: 14th Apr 2013 06:00
Thanks again. I dunno what is there. I have nothing in front of or after my <?php or ?>. But when I did a right() on my value it fixed it.

Login to post a reply

Server time is: 2024-05-01 02:43:47
Your offset time is: 2024-05-01 02:43:47