Jump to content
MakeWebGames

Problem With My Mod :S Somone Please Help


Almost

Recommended Posts

I have made a mod. this is my first big mod i have made.

i am pleased with the result and no errors or bugs are present.

but every time i try to load the page it times out and takes like 3 minutes to load and then i get this error

 

Fatal error: Maximum execution time of 120 seconds exceeded in *directory removed for privacy* on line 116

 

i'm not sure how to get to the bottom of this problem.

is the code just to long or complex? because it contains about 7+ "for" loops and plenty of arrays.

Link to comment
Share on other sites

Re: Problem With My Mod :S Somone Please Help

doesn't matter how many lines it is, if you use

 

for ($i = 0; $i < 1000000000; $i++) {
echo $i;
}

 

It's gonna be slow, if you wanna disable the time limit, put set_time_limit(0); at the top of the script to make it run until its done

Link to comment
Share on other sites

Re: Problem With My Mod :S Somone Please Help

Theres also a chance that you've somehow made an error in the code making it stuck in a certain loop forever (infinite loop) and thus passing the maximum execution time, although this is less likely to happen with for loops than with while loops.

Quick example of an infinite loop:

while(1==1)
{
$i++;
}

or

for($i=1;$i<50;$i=1) { //do whatever }
Link to comment
Share on other sites

Re: Problem With My Mod :S Somone Please Help

i do use FF :\

and thanks for the post DBS lol.

Pfft i want this mod to work baddd. my first mod and i cant get it working. not going to continue making them if this ones fucked lol

Link to comment
Share on other sites

Re: Problem With My Mod :S Somone Please Help

I know this probably a bit ughh, but why don't you post your code so we can see. Its a big hard to find the problem with something you cant see. Considering your planning on giving up on it if you cant get it to work I don't see a problem with that.

Link to comment
Share on other sites

Re: Problem With My Mod :S Somone Please Help

that is true, let me work on it a little more and if i cant get it to work ill post it for everyone to have a go at fixing. and let people add itto their game for free

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...