Page 1 of 1

Forsaken Sanctum Map Genarator

Posted: Tue Oct 25, 2011 6:37 pm
by shadow310
ok the map.php there is code to make a map i uncommented them but still don't make a make help please

Re: Forsaken Sanctum Map Genarator

Posted: Wed Oct 26, 2011 3:48 pm
by hallsofvallhalla
are you getting any errors?

I would cut the code out and put it in a page of its own, remember to add include connect.php

Re: Forsaken Sanctum Map Genarator

Posted: Wed Oct 26, 2011 6:31 pm
by shadow310
no nothing its just doing nothing at all

Re: Forsaken Sanctum Map Genarator

Posted: Wed Oct 26, 2011 7:52 pm
by hallsofvallhalla
well nothing will echo, show me the code. You checked the DB and nothing is in the map?

Re: Forsaken Sanctum Map Genarator

Posted: Thu Oct 27, 2011 5:45 pm
by shadow310
no maps in DB

Code: Select all

 // this builds initial MAP table! run only once//////////////
 /* for ($i = 1; $i <= 1000; $i+= 1)
  {
  for ($c = 1; $c <= 1000; $c+= 1)
  {
  $test = "INSERT INTO wasteland (mapr,mapc)Values('$i','$c')";
   $test2=mysql_query($test) or die("Could not get user stats");
  }
  }  */
i commented it out again

Re: Forsaken Sanctum Map Genarator

Posted: Thu Oct 27, 2011 7:56 pm
by hallsofvallhalla
and did you place this in a new file, name it test.php or whatever then put include 'connect.php' ?
Then at bottom echo "Works";


Show a screen shot of page...

Re: Forsaken Sanctum Map Genarator

Posted: Thu Oct 27, 2011 7:58 pm
by hallsofvallhalla
here is whole code

Code: Select all

include "connect.php";
$newnum = 0;
for ($i = 1; $i <= 1000; $i+= 1)
  {
  for ($c = 1; $c <= 1000; $c+= 1)
  {
$newnum = $newnum +1;
echo $newnum;  
$test = "INSERT INTO wasteland (mapr,mapc)Values('$i','$c')";
   $test2=mysql_query($test) or die("Could not get user stats");
  }
  }  

echo "Works " . $newnum;

WHOA!!!!!!!!!! Why are you doing 1,000!!! That is 1 million entries!!!

Re: Forsaken Sanctum Map Genarator

Posted: Fri Oct 28, 2011 6:59 pm
by shadow310
ok when i try it it sends me back all the code

Re: Forsaken Sanctum Map Genarator

Posted: Fri Oct 28, 2011 7:14 pm
by Gustava
Are you using the tags?

Code: Select all

<?php

?>

Re: Forsaken Sanctum Map Genarator

Posted: Sat Oct 29, 2011 3:44 pm
by hallsofvallhalla
hehe i forgot to put those in my code but yes you need to add the php tags