mxyi Posted March 25, 2011 Share Posted March 25, 2011 OK, so im trying to convert MCC v2 mods (or any other version) into a WTM (Way Of The Mafia) script, but im having alot of trouble, i tried converting an arcade mod into a WTM script but it just threw me a blank page, americawars.exofire.net/arcade.php thecode is <?php session_start(); include"includes/db_connect.php"; include"includes/functions.php"; logincheck(); $query=mysql_query("SELECT * FROM users WHERE username='$username'"); $fetch=mysql_fetch_object($query); $games=array( 'bejeweled'=>array('name'=>'Bejeweled', 'url'=>'http://www.freegames4all.net/swf/Bejeweled.swf', 'h'=>'365', 'w'=>'499'), 'blackjack'=>array('name'=>'Blackjack', 'url'=>'http://www.freegames4all.net/swf/20323.swf', 'h'=>'500', 'w'=>'500'), 'chess'=>array('name'=>'Chess', 'url'=>'http://www.freegames4all.net/swf/21337.swf', 'h'=>'500', 'w'=>'500'), 'ewoks'=>array('name'=>'Ewoks', 'url'=>'http://www.freegames4all.net/swf/20295.swf', 'h'=>'500', 'w'=>'500'), 'pacman'=>array('name'=>'Pacman', 'url'=>'http://www.zemnetmedia.com/games/pacman/pacmangame.swf', 'h'=>'470', 'w'=>'470'), 'poker'=>array('name'=>'Poker', 'url'=>'http://www.freegames4all.net/swf/20493.swf', 'h'=>'500', 'w'=>'500'), 'streetfighter'=>array('name'=>'Street Fighter', 'url'=>'http://www.freegames4all.net/swf/20643.swf', 'h'=>'500', 'w'=>'500'), ); if (!$_GET['action']) { print "<center>Welcome "$username echo " to the arcade. All these games are for fun and they will not give any money.</center> <center><h3>Game List</h3></center> <table> <tr><td>[url='arcade.php?action=bejeweled']Bejeweled[/url]</td></tr> <tr><td>[url='arcade.php?action=blackjack']BlackJack[/url]</td></tr> <tr><td>[url='arcade.php?action=chess']3D Chess[/url]</td></tr> <tr><td>[url='arcade.php?action=ewoks']Ewoks[/url]</td></tr> <tr><td>[url='arcade.php?action=pacman']PacMan[/url]</td></tr> <tr><td>[url='arcade.php?action=poker']Poker[/url]</td></tr> <tr><td>[url='arcade.php?action=streetfighter']Street Fighter II[/url]</td></tr> </table> [url='explore.php'][Go Back To The City][/url] "; } else { print "<center>Welcome "$username" to ".$games[$_GET['action']]['name']."</center> "; print "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='".$games[$_GET['action']]['w']."' height='".$games[$_GET['action']]['h']."'> <param name='movie' value='".$games[$_GET['action']]['url']."'><param name='quality' value='high'> <embed src=''".$games[$_GET['action']]['url']."'' width='".$games[$_GET['action']]['w']."' height='".$games[$_GET['action']]['h']."' align='center' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed> </object> [url='arcade.php'][Go Back To The Arcade Home][/url]"; } ?> please help me fix this i dont see whats wrong with it and why it gives me blank page! D: Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted March 25, 2011 Share Posted March 25, 2011 Blank page means you have an error and your php.ini is set to not display any PHP errors. So change that settings such that you can see what's wrong ;) Quote Link to comment Share on other sites More sharing options...
mxyi Posted March 25, 2011 Author Share Posted March 25, 2011 Error i got, Parse error: syntax error, unexpected T_VARIABLE in /home/americaw/public_html/arcade.php on line 20 Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 25, 2011 Share Posted March 25, 2011 Line 20 >> print "<center>Welcome "$username change to print "<center>Welcome $username</center>"; see if that helps Also line 36 >>> print "<center>Welcome "$username" to ".$games[$_GET['action']]['name']."</center> "; change to print "<center>Welcome $username to ".$games[$_GET['action']]['name']."</center> "; Quote Link to comment Share on other sites More sharing options...
Dominion Posted March 25, 2011 Share Posted March 25, 2011 edit - missed 1/2 the post above :whistling: Quote Link to comment Share on other sites More sharing options...
mxyi Posted March 25, 2011 Author Share Posted March 25, 2011 Yay, thanks guys :) Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 25, 2011 Share Posted March 25, 2011 If you cant see errors on your script as Alain pointed out your php.ini isnt set up to show them however if you dont have access to php.ini then you can try one of these from http://php.net/manual/en/function.error-reporting.php <?php // Turn off all error reporting error_reporting(0); // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE); // Reporting E_NOTICE can be good too (to report uninitialized // variables or catch variable name misspellings ...) error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Report all errors except E_NOTICE // This is the default value set in php.ini error_reporting(E_ALL ^ E_NOTICE); // Report all PHP errors (see changelog) error_reporting(E_ALL); // Report all PHP errors error_reporting(-1); // Same as error_reporting(E_ALL); ini_set('error_reporting', E_ALL); ?> Just place one from the above list and place in your file just after <?PHP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.