Steam Condenser Loading Screen

85 views
Skip to first unread message

Piotr Swat

unread,
Sep 10, 2013, 9:58:34 AM9/10/13
to steam-c...@googlegroups.com
Hey.

I have problem with using Steam Condenser in my loading screen. I was following this thread - http://facepunch.com/showthread.php?t=1294722 - but game throws out

Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /xxx/lib/steam/community/XMLData.php on line 34

That's how my Index.php looks (just basic, wanted to try it out).

<?php
require_once('lib/steam-condenser.php');
$communityid = $_GET["steamid"];
$steamUser = new SteamId($communityid);
$nickname = $steamUser->getNickname();
echo "Welcome back, " . $nickname;
?>

BUT!

When I try it in browser and I manually input my Steam ID, but in 32 form, it prints my nick.

Sebastian Staudt

unread,
Sep 10, 2013, 10:04:45 AM9/10/13
to steam-condenser
Hi Piotr,

the initial problem here ist that (for some reason) the XML of the profile cannot be parsed.
This leads to another fatal error that you can see.

First of all we should fix that second error.
Please let me know which versions of PHP and Steam Condenser you're using.

Best regards,
Sebastian


2013/9/10 Piotr Swat <colek.z...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Steam Condenser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to steam-condens...@googlegroups.com.
To post to this group, send email to steam-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/steam-condenser/1f3a6a99-f735-4275-977d-7f511a436844%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Piotr Swat

unread,
Sep 10, 2013, 10:48:04 AM9/10/13
to steam-c...@googlegroups.com
Thanks for fast reply!

I am using lastest Steam Condenser from Github, and I was using PHP 5.2. Upgraded it to 5.4 and it's working like charm (even this ID I posted up there).

Sorry for taking your time with such stupid mistake :)

Have a good day!
Piotr

Sebastian Staudt

unread,
Sep 10, 2013, 1:46:17 PM9/10/13
to steam-condenser
Well, that's not a stupid mistake. In fact you just found a bug. But I'm happy that you can workaround this.

Although the current master branch requires PHP 5.3 or greater, the current stable version uses the same code here and should work on PHP 5 or greater.
But line 34 of XMLData.php (https://github.com/koraktor/steam-condenser-php/blob/master/lib/steam/community/XMLData.php#L34) is not compatible with PHP < 5.3, because the third parameter for a new Exception instance was introduced with PHP 5.3 (see http://www.php.net/manual/de/exception.construct.php#refsect1-exception.construct-changelog).

I'll open an issue about this problem on GitHub. Thanks for reporting.


2013/9/10 Piotr Swat <colek.z...@gmail.com>
Reply all
Reply to author
Forward
0 new messages