#15993 - 11/04/07 02:30 PM
Re: help!!
[Re: Fayt]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
and do you find something??
|
|
Top
|
|
|
#15996 - 11/05/07 02:52 AM
Re: help!!
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
WHAT IS IN DIGG.PHP!?
|
|
Top
|
|
|
#16003 - 11/05/07 06:01 AM
Re: help!!
[Re: AnmanIndustries]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
this: <?php include('lib.php'); include('cookies.php');
function digg() { global $userrow, $controlrow; $updatequery = doquery("UPDATE {{table}} SET location='Digging', currentaction='digg' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); $page = "<table width='100%' border='1'><tr><td class='title'>Digging</td></tr></table><p>"; if ($userrow["currentaction"] != "digg") { header("Location: index.php"); die(); } $treasure = rand(1,2); if ($treasure == 1) { $page .= "You have digged"; } else { $page .= "You find nothing. Go <a href=\"index.php\">back</a> to explore the map."; }
display($page, "Digg"); } ?>
|
|
Top
|
|
|
#16008 - 11/05/07 03:31 PM
Re: help!!
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
Oh THATS digg.php
Does the script run from within another php file? If that is the case, then youve called lib.php twice, and that is the error you are getting.
|
|
Top
|
|
|
#16017 - 11/06/07 01:40 AM
Re: help!!
[Re: AnmanIndustries]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
so, if i take out "include('lib.php');" than is the problem solved
|
|
Top
|
|
|
#16024 - 11/06/07 04:31 PM
Re: help!!
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
The first thing that happens when you access the index.php file in ANY WAY, it runs the lib file. The first thing the lib file does, is set certain functions that are used through the game, such as the database queeries and display(). the FIRST function it has is stripslashes. You cant have the same function running twice in a script. That is your error.
|
|
Top
|
|
|
#16038 - 11/07/07 10:38 AM
Re: help!!
[Re: AnmanIndustries]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
yeah, i don't get a white screen no more, butt a main page white left and the rightnav
digg.php: <?php function digg() { global $userrow, $controlrow; $updatequery = doquery("UPDATE {{table}} SET currentaction='digg' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); $title = "Inn"; if ($userrow["currentaction"] != "digg") { header("Location: index.php"); die(); } $treasure = rand(1,2); if ($treasure == 1) { $page = "You have digged"; } else { $page = "You find nothing. Go <a href=\"index.php\">back</a> to explore the map."; } display($page, "Digg"); } ?>
|
|
Top
|
|
|
#16049 - 11/07/07 08:37 PM
Re: help!!
[Re: Fayt]
|
AnmanIndustries
Cookie Crisp
   
Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth
|
Offline
|
|
it will give you errors if you dont include the file
|
|
Top
|
|
|
#16059 - 11/08/07 06:41 AM
Re: help!!
[Re: AnmanIndustries]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
i did include it, so i gonna check my code
|
|
Top
|
|
|
#16079 - 11/09/07 09:09 AM
Re: help!!
[Re: Fayt]
|
Ziedaan
Malt-o-Meal
Registered: 10/26/07
Posts: 13
Loc: The Netherlands, Veghel
|
Offline
|
|
wtf
Warning: main(town.php) [function.main]: failed to open stream: No such file or directory in MYHOST/httpdocs/index.php on line 43
Warning: main(town.php) [function.main]: failed to open stream: No such file or directory in MYHOST/httpdocs/index.php on line 43
Warning: main() [function.include]: Failed opening 'town.php' for inclusion (include_path='.:/usr/share/pear') in MYHOST/httpdocs/index.php on line 43
Fatal error: Call to undefined function: digg() in MYHOST/httpdocs/index.php on line 43
BTW i have placed digg in town.php and i change it in index.php to elseif ($do[0] == "digg") { include('town.php'); digg(); } index.php and town.php is in httpdocs
Edited by Ziedaan (11/09/07 09:10 AM)
|
|
Top
|
|
|
|
|