# destrugter

Members

23

## Community Reputation

0 Neutral

• Rank
Newbie
• Birthday 08/29/1990
1. ## onKeyUp Problems

well, your solution worked...I did not see that at all.I have the \ sign because I am using php, and the javascript is located within an echo statement.Thanks for your help, I can't believe I didn't see that.
2. ## onKeyUp Problems

It automatically updates the level field to 0, and it changes the experience field to 0...it's very odd...here is a link to the script click here.
3. ## onKeyUp Problems

I actually did have a break, before I tried the method I had posted.The method I posted should update the maxlevel, so the loop repeats indefinitely until it reaches the level the person is, then it subtracts 1, thus ending the loop...but that doesn't work either.
4. ## onKeyUp Problems

No, I don't want a random number.It is just a formula that is used to determine what the experience has to be for the player to get to the next level.The first formula function experience(L) { points = 0; output = 0; minlevel = 2; // first level to display maxlevel = L-1; // last level to display for (lvl = 1; lvl <= maxlevel; lvl++) { points += Math.floor(lvl + 300 * Math.pow(2, lvl / 7.)); } return Math.floor(points / 4); } This works just fine. Putting in any number (1-99 is the only sensible range since the highest level is 99), will return the xp value.If you were to do...exper
5. ## onKeyUp Problems

Maybe I should have mentioned it's not a game I am making. I am making level calculators for a game, and that formula is the formula that retruns the experience when you plug in the level.For example, Level 2 is reached when you get 83 xp, this means that from 0 to 82 xp, you are still Level 1.Level 3 is reached at 174 xp, so from 83 to 173, you are level 2.The formula wasn't found by me. I tried figuring out a way to reverse it, and since there is no real way to do it, I made that if statement, that obviously fails.
6. ## onKeyUp Problems

Ok, so to get to the point, I have run into this problem with the onKeyUp event.I have 2 input fields. Each with an onKeyUp event attribute. They are very similar in which, when you update input B, it goes through a function to update input A. The problem is the values for input A vary widely for each value of input B.In different terms, I am running a formula for the inputs to determine what the value of the other should be. My problem is that when you update input B, it updates input A perfectly...but when you try to put in a seperate value for input A (say 1+ the value in there), it updates
7. ## Php Explode Help

Wow, that's pretty clever.I have a question though, say I go through with looking at the cURL library to do as you are explaining. Is any part of what I'm doing illegal in any way? All I'm doing is connecting to the website, grabbing 3 pieces of information so that the people who visit my site have the most accurate information about that item possible.
8. ## Php Explode Help

If I substitute that site for say, a wiki site, it will do it near instantly and perform it multiple times. It has to be something with RuneScape not wanting people to do this, which I guess I can understand.
9. ## Php Explode Help

The actual retrieving the file is what is making it so lengthy in time. When I go to that page, it doesn't take 30 seconds to load, so why would it take 30 seconds to load in this case?
10. ## Php Explode Help

Yes, I understand this. For my example though, I am only using the function 1 time for 1 specific thing. I made this as a test to see the load times and everything, and so I grabbed 1 line from it. I understand that I could do better later by loading it once, but just for the testing purposes I made it only 1 part of the file.I understand that if they change it, that would mess up my code. I am prepared for this as well. Like I said, this was just a test to see if everything would check out fine, and the only problem so far is the load time.
11. ## Php Explode Help

I tried that, and in terms of easiness and code clean-up it works great. I tested it out, and the page measured to take 37.408 seconds to load.When I save a particular webpage as a mht file, where the "obj" instance is 2, the resulting file is 364KB on disc. So if it's having to sort through a 364kb file then spit out information, I can see why this would be causing the 30 second load times.I do not think it would be possible to get this to work under 30 seconds. To do so, I would have to make php skip the first couple hundred lines of the code, and then read that information into my variable.
12. ## Php Explode Help

Hi, it's been a while since I needed help with PHP. I came across a very helpful command called explode.For my purpose, I need to grab a webpage, use explode and split it up into strings based on the new line character, which is "\n". Now I got that far, and I got as far as getting the exact result I wanted, BUT it's far too slow. My page loads in 31 seconds using explode versus most of the other pages based on my databases of 0.0006 seconds.Does anyone know a faster alternative to doing this? Or is PHP just not ready to handle an external webpage of 300+ lines within seconds?If there is a fas
13. ## MySQL and PHP

Try replacing "localhost" with "mysql" that should solve your problem.
14. ## Need BBCode Help

EDIT: Ok, nvm I got it working now.
15. ## My first website

It sounds like you are hand coding every single thing on every page...that is not very good. Why not have includes and all of that? What you might try doing is put <body text="COLOR OR HEX COLOR HERE"> at the top where your body section starts?
×
×
• Create New...