Fixes

All code and questions for Urban Realms, Forsaken Sanctum, ect...
rapid3642
Posts: 45
Joined: Thu Nov 26, 2009 9:38 pm

Re: Fixes

Post by rapid3642 »

Ok so now im getting another error. i know great here we go again.

this time im at a weapon forge and when i enter it and click on "craft material into weapon" it gives me this error.

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/vslayers/public_html/s/crafting/craftmatweapon.php on line 95

anyone got any idea on what it might be??

here is the script
------------------------------------------------------------------------------------

Code: Select all

<?php
   $houseid = $_GET['pid'];
		
	echo "<big><center>What type of weapon would you like to Craft?</big></center>";
	echo "<br><br>";
	echo "<center><br><A href='craftweapon2.php?type=blade&pid=$houseid'>One handed Blade</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=2h_blade&pid=$houseid'>Two Handed Blade</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=axe&pid=$houseid'>Axe</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=polearm&pid=$houseid'>Pole Arm</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=bow&pid=$houseid'>Bow</a><br>";	
//91-----V
	echo "<center><br><A href='craftweapon2.php?type=blunt&pid=$houseid'>Blunt</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=knife&pid=$houseid'>Knife</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=crossbow&pid=$houseid'>Crossbow</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=light_pistol&pid=$houseid'>Light Pistol</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=heavy_pistol&pid=$houseid'>Heavy Pistol</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=energy_pistol&pid=$houseid'>Energy Pistol</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=energy_rifle&pid=$houseid'>Energy Rifle</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=light_rifle&pid=$houseid'>Light Rifle</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=heavy_rifle&pid=$houseid'>Heavy Rifle</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=shotgun&pid=$houseid'>Shotgun</a><br>";	
			
    echo "<br><center><br><A href='../locations/map.php'><img src='../images/gobackbutt.png' width='150' height='50' border='0'/>";
	?>
User avatar
Asgarth
Posts: 62
Joined: Tue Aug 10, 2010 11:57 am

Re: Fixes

Post by Asgarth »

rapid3642 wrote:Ok so now im getting another error. i know great here we go again.

this time im at a weapon forge and when i enter it and click on "craft material into weapon" it gives me this error.

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/vslayers/public_html/s/crafting/craftmatweapon.php on line 95

anyone got any idea on what it might be??

here is the script
------------------------------------------------------------------------------------

Code: Select all

<?php
   $houseid = $_GET['pid'];
		
	echo "<big><center>What type of weapon would you like to Craft?</big></center>";
	echo "<br><br>";
	echo "<center><br><A href='craftweapon2.php?type=blade&pid=$houseid'>One handed Blade</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=2h_blade&pid=$houseid'>Two Handed Blade</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=axe&pid=$houseid'>Axe</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=polearm&pid=$houseid'>Pole Arm</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=bow&pid=$houseid'>Bow</a><br>";	
//91-----V
	echo "<center><br><A href='craftweapon2.php?type=blunt&pid=$houseid'>Blunt</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=knife&pid=$houseid'>Knife</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=crossbow&pid=$houseid'>Crossbow</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=light_pistol&pid=$houseid'>Light Pistol</a><br>";
	echo "<center><br><A href='craftweapon2.php?type=heavy_pistol&pid=$houseid'>Heavy Pistol</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=energy_pistol&pid=$houseid'>Energy Pistol</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=energy_rifle&pid=$houseid'>Energy Rifle</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=light_rifle&pid=$houseid'>Light Rifle</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=heavy_rifle&pid=$houseid'>Heavy Rifle</a><br>";	
	echo "<center><br><A href='craftweapon2.php?type=shotgun&pid=$houseid'>Shotgun</a><br>";	
			
    echo "<br><center><br><A href='../locations/map.php'><img src='../images/gobackbutt.png' width='150' height='50' border='0'/>";
	?>
The error is not set in useWF, look in craftmatweapon.php and replace the following code with what i wrote below.

Code: Select all

<?php
	print "<center>";
	print "<table border='0' width='70%' cellspacing='20'>";
      print "<tr><td width='25%' valign='top'>";
      print "</td>";
      print "<td valign='top' width='75%'>";
      $selectbackpack="SELECT * from equip where id='$id' AND craft < 5";
      $selectbackpack2=mysql_query($selectbackpack) or die(mysql_error());
      print "<table border='1' bordercolor='white' bgcolor='#00000'>";
      print "<tr><td>Name<font color='000000'>______________</font></td><td>Type<font color='000000'>________</font></td><td>Durability</td><td>Speed</td><td>Rating</td><td>Damage</td><td>Crafts<font color='000000'>_</font>left</td></tr>";
      while($selectbackpack3=mysql_fetch_array($selectbackpack2))
      {
	  $crafts =" 5 - $selectbackpack3[craft]";
       echo "<tr><td>$selectbackpack3[name]</td><td>$selectbackpack3[type]</td><td>$selectbackpack3[durability]</td><td>$selectbackpack3[speed]</td><td>$selectbackpack3[rating]</td><td>$selectbackpack3[damage]</td><td>$crafts[craft]</td><td><A href=craftmatweapon2.php?randid=$selectbackpack3[randid]&type=$selectbackpack3[type]&pid=$houseid'>Craft</a></td></tr>";
          
      }
      print "</table>";
      print "</td></tr></table>";    
      print "</center>";
	echo "<center>Choose a weapon to craft on.</center>";
	echo "<br><br><center><br><A href='../locations/map.php'>Go Back</a>";
	?>
The revised update will be available soon.
Last edited by Asgarth on Sun Aug 15, 2010 9:23 pm, edited 1 time in total.
Image
User avatar
Asgarth
Posts: 62
Joined: Tue Aug 10, 2010 11:57 am

Re: Fixes

Post by Asgarth »

Same error exist in craftmatweapon2.php so here is the fix for:

craftmatweapon2.php

Code: Select all

 <?php
	$randid = $_GET['randid'];
	$type = $_GET['type'];
	  print "<center>";
      print "<table border='0' width='70%' cellspacing='20'>";
      print "<tr><td width='25%' valign='top'>";
      print "</td>";
      print "<td valign='top' width='75%'>";
      $selectbackpack="SELECT * from backpack where id='$id' AND consumable != 1 AND type != 'food'";
      $selectbackpack2=mysql_query($selectbackpack) or die("could not select materials");
      print "<table border='1' bordercolor='white' bgcolor='#00000'>";
      print "<tr><td>Name<font color='000000'>______________</font></td><td>Type<font color='000000'>________</font></td><td>Stat</td><td>Mod</td></tr>";
      while($selectbackpack3=mysql_fetch_array($selectbackpack2))
      {
	  $crafts = 5 - $selectbackpack3['craft'];
       print "<tr><td>$selectbackpack3[name]</td><td>$selectbackpack3[type]</td><td>$selectbackpack3[stats]</td><td>$selectbackpack3[modadd]</td><td><A href='craftmatweapon3.php?randid=$randid&type=$type&randid2= $selectbackpack3[randid]&type2= $selectbackpack3['type']&pid=$houseid'>Add</a></td></tr>";
          
      }
      print "</table>";
      print "</td></tr></table>";    
      print "</center>";
	echo "<center>Choose a material to add to the weapon.</center>";
	$updatecheat="Update anticheat set weaponforge=1 where id='$id'";
	    mysql_query($updatecheat) or die("Could not update cheat");
  ?>
Have fun.
Image
kizeren
Posts: 2
Joined: Thu Aug 19, 2010 12:11 am

Re: Fixes

Post by kizeren »

craftweapon2.php kept giving me this error.

Code: Select all

[Wed Aug 18 19:07:00 2010] [error] [client 192.168.1.107] PHP Parse error:  syntax error, unexpected '"' in /srv/http/webgame/crafting/craftweapon2.php on line 156, referer: http://192.168.1.11/webgame/crafting/craftweapon.php?pid=2
All the way from line 156 to 170 gave this error.

Code in question.

Code: Select all

	if ($weapon == 'blade'){$name = 'One Handed Blade'";}
	if ($weapon == '2h_blade'){$name = 'Two Handed Blade'";}
	if ($weapon == 'axe'){$name = 'Axe'";}
	if ($weapon == 'pole_arm'){$name = 'Pole Arm'";}
	if ($weapon == 'bow'){$name = 'Bow';}
	if ($weapon == 'blunt'){$name = 'Blunt Weapon'";}
	if ($weapon == 'knife'){$name = 'Knife'";}
	if ($weapon == 'crossbow'){$name = 'Crossbow'";}
	if ($weapon == 'light_pistol'){$name = 'Light Pistol'";}
	if ($weapon == 'heavy_pistol'){$name = 'Heavy Pistol'";}
	if ($weapon == 'energy_pistol'){$name = 'Energy Pistol'";}
	if ($weapon == 'energy_rifle'){$name = 'Energy Rifle'";}
        if ($weapon == 'light_rifle'){$name = 'Light Rifle'";}
	if ($weapon == 'heavy_rifle'){$name = 'Heavy Rifle'";}
	if ($weapon == 'shotgun'){$name = 'Shotgun'";}
What I had to do to fix this "blank screen" Excuse my lack of php code jargin.
Removed " after each name.

Code: Select all

        if ($weapon == 'blade'){$name = 'One Handed Blade';}
        if ($weapon == '2h_blade'){$name = 'Two Handed Blade';}
        if ($weapon == 'axe'){$name = 'Axe';}
        if ($weapon == 'pole_arm'){$name = 'Pole Arm';}
        if ($weapon == 'bow'){$name = 'Bow';}
        if ($weapon == 'blunt'){$name = 'Blunt Weapon';}
        if ($weapon == 'knife'){$name = 'Knife';}
        if ($weapon == 'crossbow'){$name = 'Crossbow';}
        if ($weapon == 'light_pistol'){$name = 'Light Pistol';}
        if ($weapon == 'heavy_pistol'){$name = 'Heavy Pistol';}
        if ($weapon == 'energy_pistol'){$name = 'Energy Pistol';}
        if ($weapon == 'energy_rifle'){$name = 'Energy Rifle';}
        if ($weapon == 'light_rifle'){$name = 'Light Rifle';}
        if ($weapon == 'heavy_rifle'){$name = 'Heavy Rifle';}
        if ($weapon == 'shotgun'){$name = 'Shotgun';}

Hopefully I didn't screw toooo much up?
kizeren
Posts: 2
Joined: Thu Aug 19, 2010 12:11 am

Re: Fixes

Post by kizeren »

craftmatweapon2.php was coming up with an error. Blank page.

Code: Select all

[Wed Aug 18 19:45:53 2010] [error] [client 192.168.1.107] PHP Parse error:  syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /srv/http/webgame/crafting/craftmatweapon2.php on line 75, referer: http://192.168.1.11/webgame/crafting/craftmatweapon.php?pid=2
Lines in question.

Code: Select all

	  $crafts = 5 - $selectbackpack3['craft'];

       print "<tr><td>$selectbackpack3[name]</td><td>$selectbackpack3[type]</td><td>$selectbackpack3[stats]</td><td>$selectbackpack3[modadd]</td><td><A href='craftmatweapon3.php?randid=$randid&type=$type&randid2= $selectbackpack3[randid]&type2= $selectbackpack3['type']&pid=$houseid'>Add</a></td></tr>";
I had to remove tick marks from craft and type.

Code: Select all

	  $crafts = 5 - $selectbackpack3[craft];

       print "<tr><td>$selectbackpack3[name]</td><td>$selectbackpack3[type]</td><td>$selectbackpack3[stats]</td><td>$selectbackpack3[modadd]</td><td><A href='craftmatweapon3.php?randid=$randid&type=$type&randid2= $selectbackpack3[randid]&type2= $selectbackpack3[type]&pid=$houseid'>Add</a></td></tr>";
All seems to work fine. Further testing always on the order menu it seems.
Post Reply

Return to “Hall's Games”