Almost Posted June 27, 2007 Share Posted June 27, 2007 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. Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted June 27, 2007 Share Posted June 27, 2007 Re: Problem With My Mod :S Somone Please Help How much are you looping through? The error's kinda straightforward :p Quote Link to comment Share on other sites More sharing options...
Almost Posted June 27, 2007 Author Share Posted June 27, 2007 Re: Problem With My Mod :S Somone Please Help i really didn't think i would get that problem the whole file is only 300 lines. mostly loops and arrays. im guessing its just not going to work then lol Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted June 27, 2007 Share Posted June 27, 2007 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 Quote Link to comment Share on other sites More sharing options...
Almost Posted June 27, 2007 Author Share Posted June 27, 2007 Re: Problem With My Mod :S Somone Please Help ok, i guess theres nothing i can do then. no point in the mod without the loops lol pfft would have been better to know this when i started Quote Link to comment Share on other sites More sharing options...
Dabomstew Posted June 29, 2007 Share Posted June 29, 2007 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 } Quote Link to comment Share on other sites More sharing options...
Almost Posted June 29, 2007 Author Share Posted June 29, 2007 Re: Problem With My Mod :S Somone Please Help so for($i=1;$i<50;$i=1) { //do whatever } that could be my problem? because i have loops like this Quote Link to comment Share on other sites More sharing options...
Michael Posted June 29, 2007 Share Posted June 29, 2007 Re: Problem With My Mod :S Somone Please Help Wow Man ! You got a reply from DBS, in all my CE time i havnt seen many of those ! Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted June 29, 2007 Share Posted June 29, 2007 Re: Problem With My Mod :S Somone Please Help Yeah, that'll loop forever It resets to one on each loop,so it'll always be less than 50 Use firefox, it'll automatically end the page if it detects that it's looping forever (i think) Quote Link to comment Share on other sites More sharing options...
Almost Posted June 30, 2007 Author Share Posted June 30, 2007 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 Quote Link to comment Share on other sites More sharing options...
Almost Posted June 30, 2007 Author Share Posted June 30, 2007 Re: Problem With My Mod :S Somone Please Help Here is an example of a loop in my code for ($i = 1; $i <= 6; $i++) this causing the problem? Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted June 30, 2007 Share Posted June 30, 2007 Re: Problem With My Mod :S Somone Please Help Nope, that'll be fine Quote Link to comment Share on other sites More sharing options...
Matty Posted July 1, 2007 Share Posted July 1, 2007 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. Quote Link to comment Share on other sites More sharing options...
Almost Posted July 1, 2007 Author Share Posted July 1, 2007 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 Quote Link to comment Share on other sites More sharing options...
Matty Posted July 1, 2007 Share Posted July 1, 2007 Re: Problem With My Mod :S Somone Please Help Thats great. I don't want it too be a waste of code, and time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.