I think it is way way past time that you show us your complete code *AS IT IS NOW*.
And I don't understand this part, at all:
Quote:
|
I don't know how to run the code through a browser
|
If you aren't running this code in a browser, how *ARE* you running it???
Oh...and finally...
This code:
Code:
if (EXP<600) { plevel = 1; }
else if (EXP<700) { plevel = 2; }
else if (EXP<750) { plevel = 3; }
else if (EXP<900) { plevel = 4; }
else if (EXP<1000){plevel = 5; }
...
happens to be written in JavaScript, but the *logic* of it is universal. It would work the same in any computer language. Or in any human who applied the logic of it without a computer involved. So don't look at it as JavaScript code. Look at it from a logical viewpoint. Pick some EXP value (just for example, say 832, or choose one of your own) and then apply the logic/formulae there to see how it works.
You have to be able to express a problem in logical terms, in English or whatever your native language is, *FIRST*. Only then can you code it in the computer language of your choice.