se7enet purgatorio

Page 2 of 2 <12
Topic Options
Rate This Topic
#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
#15994 - 11/04/07 04:39 PM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
I haven't had a chance.
_________________________
MasterFayt - Amara 5 - Manas - Banar

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!?
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

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
#16006 - 11/05/07 10:41 AM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Basicly it's a random chance that you have found something, or you didn't. That's it. I already have that in my game. It's 6 buttons that alterate. So you pick a spot and you may or may not find anything.
_________________________
MasterFayt - Amara 5 - Manas - Banar

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.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

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
#16019 - 11/06/07 08:37 AM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
You can try it, but like anman said, your calling that script from somewhere else.
_________________________
MasterFayt - Amara 5 - Manas - Banar

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.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

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
#16039 - 11/07/07 12:13 PM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
In your index.php did you add like this

if ([do] == "digg") include(digg.php)digg(); ?

Or however the crap you code it, that's wrong, but you know what I mean. Did you include the file to access the function?
_________________________
MasterFayt - Amara 5 - Manas - Banar

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
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

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
#16080 - 11/09/07 09:31 AM Re: help!! [Re: Ziedaan]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Ha. I am will not comment on this.....
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
Page 2 of 2 <12


Hop to:

se7enet

Barack Obama Logo