How to debug Server Syntax Error
Posted: 30 September 2020, 23:21
How can I debug why this message is appearing in the playing-player's JS console but I think is really coming from the PHP side?
I am not allowed access to the source code for the referenced file:
So, I cannot see what's on line 479. Clicking PRETTY PRINT in the JS shows many very obscure references so I don't know how to follow it.
The error does not appear in the server side logs, BUT: the server log shows a 2nd identical playCard weblink being called after the first one, which it shouldn't do. This is that link:
I cannot figure out why it's being called a 2nd time. The 1st call made the cards move and the other players saw the cards move and the SQL DB is correct.
BACKSTORY:
I'm implementing a card game where cards can be played from a player's hand, or swapped with jokers, or discarded, etc... (a rummy game). I've learned a lot but this is my first game implementation. Much of it works (you can draw cards, discard cards...)
(My game is called "tutorialrumone". I do have a function called "playCard", among many others.)
The thing is, the cards play properly but still the message appears.
Any advice on what I'm doing wrong? Thanks in advance!
Code: Select all
Server syntax error: tutorialrumone/tutorialrumone/playCard.html SyntaxError: Unexpected token '<' / <br />
<b>Notice</b>: Array to string conversion in <b>/var/tournoi/release/tournoi-200922-0852-gs/www/game/utility/trace.game.php</b> on line <b>479</b><br />
<br />
<b>Notice</b>: Array to string conversion in <b>/var/tournoi/release/tournoi-200922-0852-gs/www/game/utility/trace.game.php</b> on line <b>479</b><br />
<br />
<b>Notice</b>: Array to string conversion in <b>/var/tournoi/release/tournoi-200922-0852-gs/www/game/utility/trace.game.php</b> on line <b>479</b><br />
{"status":1,"data":{"valid":1,"data":null}}
Code: Select all
trace.game.phpThe error does not appear in the server side logs, BUT: the server log shows a 2nd identical playCard weblink being called after the first one, which it shouldn't do. This is that link:
Code: Select all
https://studio.boardgamearena.com/1/tutorialrumone/tutorialrumone/playCard.html?card_id=24&player_id=2333742&boardArea=playerDown_B&boardPlayer=2333743&lock=b40e04c4-7ec3-4935-8f02-db0be438d7ab&table=198904&testuser=2333742&dojo.preventCache=1601501712503I cannot figure out why it's being called a 2nd time. The 1st call made the cards move and the other players saw the cards move and the SQL DB is correct.
BACKSTORY:
I'm implementing a card game where cards can be played from a player's hand, or swapped with jokers, or discarded, etc... (a rummy game). I've learned a lot but this is my first game implementation. Much of it works (you can draw cards, discard cards...)
(My game is called "tutorialrumone". I do have a function called "playCard", among many others.)
The thing is, the cards play properly but still the message appears.
Any advice on what I'm doing wrong? Thanks in advance!