WebDev

Battle => Battle Support => Topic started by: bigguy on April 05, 2018, 11:12:34 PM

Title: Profile error
Post by: bigguy on April 05, 2018, 11:12:34 PM
When I view a profile I get an error. On line 209 of profile-view.php:

<a href="' . $scripturl . '?action=battle;sa=fight;attack=' . $message['member']['id'] . ';session=' . $context['session_id'] . $check . ';#battle_main">' . $txt['battle_statsATK'] . '</a>
QuoteType of error: Undefined
8: Undefined variable: message
Title: Re: Profile error
Post by: bigguy on April 05, 2018, 11:13:42 PM
Is this part right ??

';session='
Title: Re: Profile error
Post by: Chen Zhen on April 05, 2018, 11:19:46 PM

Most likely I used the wrong array for that parsing edit.
I will fix it this weekend.

The session part is correct as it is a unique session ID that Battle uses (SMF's + a bit of its own).
It has that special session id to stop people from cheating and works fairly well actually.
If you attempt to go back in the browser while playing Battle it will tell you not to do it.
Without that behavior people would cheat.
 
Title: Re: Profile error
Post by: bigguy on April 05, 2018, 11:25:51 PM
Awesome, lol. that's cool. It just didn't look right to me so I thought that was the error.
Title: Re: Profile error
Post by: bigguy on April 10, 2018, 08:28:31 AM
Found and fixed. I was playin around this morning:

https://www.whatsurbeef.net/index.php?topic=369.0

I'd copy it here but a bit lazy now, lol.
EhPortal 1.39.6 © 2024, WebDev