DELETE-ME-NOW- Posted July 30, 2010 Share Posted July 30, 2010 Ive been trying to make it that you can unlock new areas in explore, main menu, and other places as you level up. As an exampe, ive been trying this: 42. if($ir['level'] > 20) 43. { 44. Auction Market But this results in : Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home2/mafiakil/public_html/explore.php on line 42 . I have tryed loads of different ways to fix it, but none have worked :( Quote Link to comment Share on other sites More sharing options...
iSOS Posted July 30, 2010 Share Posted July 30, 2010 if($ir['level'] > 20) { echo ('[url="Auction.php"]Auction Market[/url] '); } Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 Thanks alot. Ill try it Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home2/mafiakil/public_html/explore.php on line 41 I changed the "Auction.php" to 'Auction.php', still same :/ Quote Link to comment Share on other sites More sharing options...
iSOS Posted July 30, 2010 Share Posted July 30, 2010 There is no error in the code I posted, make sure you're ending the current "print" before you put that statement. I think you're doing something like this which is wrong... print " Blah Blah Blah if($ir['level'] > 20) { echo ('[url="Auction.php"]Auction Market[/url] '); } Blah Blah Blah "; Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 [url='itemsearch.php']Search Player Shops[/url] if($ir['level'] > 20) { echo ('[url='Auction.php']Auction Market[/url] '); } [url='itemmarket.php']Item Market[/url] Thats the part of the code... Quote Link to comment Share on other sites More sharing options...
furn355 Posted July 30, 2010 Share Posted July 30, 2010 print"[url='itemsearch.php']Search Player Shops[/url] "; # that if you are using print or '; if using echo if($ir['level'] > 20) { echo ('[url='Auction.php']Auction Market[/url] '); } # or echo' whichever you rather print" [url='itemmarket.php']Item Market[/url] Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 Ahh right. But can someone give me the correct line that will work properly? Quote Link to comment Share on other sites More sharing options...
furn355 Posted July 30, 2010 Share Posted July 30, 2010 Post your script here and I will do it for you. Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 <?php include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] > 0) { die("[b]<font color=red size=+1>You are in Jail for {$ir['jail']} more minute(s). Until you are out you can't view this page</font>[/b] [url='jail.php']Return to Jail[/url]"); } if($ir['hospital'] > 0) { die("[b]<font color=red size=+1>You are in the Hospital for {$ir['hospital']} more minute(s). Until you are out you can't view this page</font>[/b] [url='hospital.php']Return to Hospital[/url]"); } print " <center><table width='715' height='385' border='1' cellpadding='2' class='tablejf1'><center></font><font color=red></font>This is your referal link: http://game-name.com/register.php?REF=$userid Every signup from this link earns you 30 valuable Points! <tr background='header.gif'></font><font color=red></font> <td height='25'><div align='center'>[b] <font color=white><u></font><font color=red>Market</u></u>[/b]</div></td> <td><div align='center'>[b] <font color=white><u></font><font color=red>Living Quarters<u/>[/b]</u></div></td> <td><div align='center'>[b] <font color=white><u></font><font color=red>Cash Industry</u></font>[/b]</u></div> <td><div align='center'>[b] <font color=white><u></font><font color=red>Dark Side<u/>[/b]</u></div></td></td> </tr> <tr> !NEW! <td><div align='center'>[b] [url='shops.php']Game Shops[/url] [url='myshop.php']Your Shop[/url] [url='playershops.php']Player Shops[/url] print'[url='itemsearch.php']Search Player Shops[/url] '; if($ir['level'] > 20) { echo ('[url='Auction.php']Auction Market[/url] '); } print' [url='itemmarket.php']Item Market[/url] [url='cmarket.php']Points Market[/url] </td> [/b]</div></td> <td><div align='center'>[b] [url='monorail.php']Travel[/url] [url='houses.php']Houses[/url]<br [url='pointbank.php']Points Bank[/url] </td> [/b]</div></td> <td><div align='center'>[b] [url='bank.php']City Bank[/url] [url='creditcard.php']Credit Card[/url] [url='business_view.php']Business listings[/url] [url='business_create.php']Create a business[/url] [url='business_home.php']Your business[/url] [/b]</div></td> <td><div align='center'>[b] [url='crystaltemple.php']Points Temple[/url] [url='hitmanagency.php']Hitman Agency[/url] [url='marital.php']Marital Agency[/url] [url='donatorlist.php']View Donators[/url] [url='gymrecord.php']Gym Record[/url] [url='games.php']Arcade[/url] </div>[/b]</td> </tr> <tr background='header.gif'> <td height='25'><div align='center'>[b] <font color=white><u></font><font color=red>Statistics Dept</u>[/b]</u></div></td> <td><div align='center'>[b] <font color=white><u></font><font color=red>Mysterious[/b]</u></div></td> "./*<td><div align='center'>[b] <font color=white><u></font><font color=red>Drugs Makers</font>[/b]</u></div></td> */"<td><div align='center'>[b] <font color=white><u></font><font color=red>Gambling Central<u/>[/b]</u></div></td><td><div align='center'>[b] <font color=white><u></font><font color=red>Central<u/>[/b]</u></div></td> </tr> <tr> <td><div align='center'>[b] <a href='userlist.php'>Users list[b] <a href='stafflist.php'>Game Name Staff[b] [url='halloffame.php']Hall of Fame[/url] <a href='hos.php'>Hall of Shame[b] <a href='stats.php'>Game Stats[b] [url='usersonline.php']Users Online[/url] [/b]</div></td> <td><div align='center'>[b] [url='missions.php']Missions[/url] [url='raffle.php']Raffle House[/url] [url='polling.php']Polling Station[/url] [url='StaffApps.php']Appy For Staff[/url] [url='brothel.php']Brothel House[/url] [/b]</div></td> "./*<td><div align='center'>[b] [url='drugfarm.php']Drug Farm[/url] [url='drugsmarket.php']Drugs Market[/url] [url='drugfarm.php?action=premade']Buy Drugs[/url] [url='drugfarm.php?action=mydrugs']Your Drugs[/url] [/b]</div></td> */"<td><div align='center'>[b] [url='5050c.php']50/50 Money[/url] [url='5050p.php']50/50 Points[/url] [url='lottery.php']Lottery[/url] [url='crack.php']Crack The Safe[/url] [url='searchdowntown.php']Search Downtown[/url] [url='casino.php']Casino[/url] </div>[/b]</td> <td><div align='center'>[b] [url='mailbox.php']Mailbox[/url] [url='gym.php']Gym[/url] [url='events.php']Events[/url] [url='forums.php']Forums[/url] [url='gamerules.php']Rules[/url] [url='breport.php']Bug Report[/url] </div>[/b]</td> </tr> </table>"; $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted July 30, 2010 Share Posted July 30, 2010 When a script has an error look at the line number to see whats happening. In this case line 42 print' is incorrect. print " I would also remove all of these "./*<td><div align='center'> <font color=white><u></font><font color=red>Drugs Makers</font></u></div></td> */ Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 Those print bits arnt meant to be there... <td><div align='center'>[b] [url='shops.php']Game Shops[/url] [url='myshop.php']Your Shop[/url] [url='playershops.php']Player Shops[/url] [url='itemsearch.php']Search Player Shops[/url] '; if($ir['level'] > 20) { echo ('[url='Auction.php']Auction Market[/url] '); } [url='itemmarket.php']Item Market[/url] [url='cmarket.php']Points Market[/url] </td> [/b]</div></td> Thats the code section i need help with. Quote Link to comment Share on other sites More sharing options...
furn355 Posted July 30, 2010 Share Posted July 30, 2010 This has been tested and wokrs. <?php include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] > 0) { die("[b]<font color=red size=+1>You are in Jail for {$ir['jail']} more minute(s). Until you are out you can't view this page</font>[/b] [url='jail.php']Return to Jail[/url]"); } if($ir['hospital'] > 0) { die("[b]<font color=red size=+1>You are in the Hospital for {$ir['hospital']} more minute(s). Until you are out you can't view this page</font>[/b] [url='hospital.php']Return to Hospital[/url]"); } print " <center><table width='715' height='385' border='1' cellpadding='2' class='tablejf1'><center></font><font color=red></font>This is your referal link: http://game-name.com/register.php?REF=$userid Every signup from this link earns you 30 valuable Points! <tr background='header.gif'></font><font color=red></font> <td height='25'><div align='center'>[b] <font color=white><u></font><font color=red>Market</u></u>[/b]</div></td> <td><div align='center'>[b] <font color=white><u></font><font color=red>Living Quarters<u/>[/b]</u></div></td> <td><div align='center'>[b] <font color=white><u></font><font color=red>Cash Industry</u></font>[/b]</u></div> <td><div align='center'>[b] <font color=white><u></font><font color=red>Dark Side<u/>[/b]</u></div></td></td> </tr> <tr> <td><div align='center'>[b] [url='shops.php']Game Shops[/url] [url='myshop.php']Your Shop[/url] [url='playershops.php']Player Shops[/url] print'[url='itemsearch.php']Search Player Shops[/url] "; if($ir['level'] > 20) { echo '[url="Auction.php"]Auction Market[/url] '; } print" [url='itemmarket.php']Item Market[/url] [url='cmarket.php']Points Market[/url] </td> [/b]</div></td> <td><div align='center'>[b] [url='monorail.php']Travel[/url] [url='houses.php']Houses[/url]<br [url='pointbank.php']Points Bank[/url] </td> [/b]</div></td> <td><div align='center'>[b] [url='bank.php']City Bank[/url] [url='creditcard.php']Credit Card[/url] [url='business_view.php']Business listings[/url] [url='business_create.php']Create a business[/url] [url='business_home.php']Your business[/url] [/b]</div></td> <td><div align='center'>[b] [url='crystaltemple.php']Points Temple[/url] [url='hitmanagency.php']Hitman Agency[/url] [url='marital.php']Marital Agency[/url] [url='donatorlist.php']View Donators[/url] [url='gymrecord.php']Gym Record[/url] [url='games.php']Arcade[/url] </div>[/b]</td> </tr> <tr background='header.gif'> <td height='25'><div align='center'>[b] <font color=white><u></font><font color=red>Statistics Dept</u>[/b]</u></div></td> <td><div align='center'>[b] <font color=white><u></font><font color=red>Mysterious[/b]</u></div></td> "./*<td><div align='center'>[b] <font color=white><u></font><font color=red>Drugs Makers</font>[/b]</u></div></td> */"<td><div align='center'>[b] <font color=white><u></font><font color=red>Gambling Central<u/>[/b]</u></div></td><td><div align='center'>[b] <font color=white><u></font><font color=red>Central<u/>[/b]</u></div></td> </tr> <tr> <td><div align='center'>[b] <a href='userlist.php'>Users list[b] <a href='stafflist.php'>Game Name Staff[b] [url='halloffame.php']Hall of Fame[/url] <a href='hos.php'>Hall of Shame[b] <a href='stats.php'>Game Stats[b] [url='usersonline.php']Users Online[/url] [/b]</div></td> <td><div align='center'>[b] [url='missions.php']Missions[/url] [url='raffle.php']Raffle House[/url] [url='polling.php']Polling Station[/url] [url='StaffApps.php']Appy For Staff[/url] [url='brothel.php']Brothel House[/url] [/b]</div></td> <td><div align='center'>[b] [url='drugfarm.php']Drug Farm[/url] [url='drugsmarket.php']Drugs Market[/url] [url='drugfarm.php?action=premade']Buy Drugs[/url] [url='drugfarm.php?action=mydrugs']Your Drugs[/url] [/b]</div></td> <td><div align='center'>[b] [url='5050c.php']50/50 Money[/url] [url='5050p.php']50/50 Points[/url] [url='lottery.php']Lottery[/url] [url='crack.php']Crack The Safe[/url] [url='searchdowntown.php']Search Downtown[/url] [url='casino.php']Casino[/url] </div>[/b]</td> <td><div align='center'>[b] [url='mailbox.php']Mailbox[/url] [url='gym.php']Gym[/url] [url='events.php']Events[/url] [url='forums.php']Forums[/url] [url='gamerules.php']Rules[/url] [url='breport.php']Bug Report[/url] </div>[/b]</td> </tr> </table>"; $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
DELETE-ME-NOW- Posted July 30, 2010 Author Share Posted July 30, 2010 yea it works. But the table at the right is fuked up :/ Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted July 30, 2010 Share Posted July 30, 2010 You will need to look at the site css, html to resolve that. When it comes to mc2 Im a firm believer in you should rip out all the css embeded in the code and place it in external files. Quote Link to comment Share on other sites More sharing options...
furn355 Posted July 30, 2010 Share Posted July 30, 2010 Also its your coding that messes up tables. I only made the php to work. Maybe you should go back to looking at html before working further on game and releasing a sub standard product 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.