Forsaken Sanctum Map Genarator
Forsaken Sanctum Map Genarator
ok the map.php there is code to make a map i uncommented them but still don't make a make help please
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Forsaken Sanctum Map Genarator
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
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
no nothing its just doing nothing at all
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Forsaken Sanctum Map Genarator
well nothing will echo, show me the code. You checked the DB and nothing is in the map?
Re: Forsaken Sanctum Map Genarator
no maps in DB
i commented it out again
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");
}
} */- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Forsaken Sanctum Map Genarator
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...
Then at bottom echo "Works";
Show a screen shot of page...
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Forsaken Sanctum Map Genarator
here is whole code
WHOA!!!!!!!!!! Why are you doing 1,000!!! That is 1 million entries!!!
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
ok when i try it it sends me back all the code
Re: Forsaken Sanctum Map Genarator
Are you using the tags?
Code: Select all
<?php
?>- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Forsaken Sanctum Map Genarator
hehe i forgot to put those in my code but yes you need to add the php tags