MyBB Community Forums

Full Version: Game Section
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, so there were problems on both ends Big Grin
Well, MySQL STRICT don't allow the query made by the Game Section/MyBB.
Hmmm, I'm sure I disabled it when I installed MySQL
Paretje Wrote:Well, the problem was the insert of the default game. I didn't use the ratings in it. I rated it now as one, because zero doesn't work. I will make the full UPDATE query by my self in the next Game Section release Wink

Just delete:
'gid'		=> NULL,
And all other similar lines.
'gid' will auto_increment, so you do not need to specify a value.
That wasn't the problem, the problem was the rating. Normally, I don't give that a value, but he didn't accept that. The fix was to set the rating to 1.

$game = array(
	'gid'		=> NULL,
	'cid'		=> intval("0"),
	'name'		=> addslashes("pacman"),
	'title'		=> addslashes("Pacman"),
	'description'	=> addslashes("Eat all the little dots without letting the ghosts get you!"),
	'what'		=> addslashes("Eat all of the dots."),
	'use_keys'	=> addslashes("Arrow keys to move."),
	'bgcolor'	=> addslashes("000000"),
	'active'	=> addslashes("yes"),
	'width'		=> addslashes("360"),
	'height'	=> addslashes("420"),
	'dateline'	=> time(),
	'score_type'	=> addslashes("DESC"),
	'rating'	=> intval(1)
);
Yes, the missing rating value was one of the problems.

The other problem is just removing the NULL entries.

Trust me - I have MySQL set up in strict mode, and I know that if you set the rating value, and remove the NULLs, it works.
But in that version that worked, I didn't remove NULL of the gid...
When I said it worked, that was after I removed the Strict Table setting.
Ow, OK ...
Paretje Wrote:But in that version that worked, I didn't remove NULL of the gid...
Dunno, but on my server (MySQL 5.0.48 STRICT), if you supply NULL, it will give an SQL error.
I've never seen any issues if you remove the NULL.

Odd.