PDA

View Full Version : Credit Converter Script



Verrou
04-01-2007, 06:44 AM
I need help :S I can get it to convert credits to dollars but not dollars to credits!
Does someone know how to do it?

<html>
<head><title>Habbo Credit Converter || AndreHamon.com</title>
<body>
<script language="JavaScript">
function talertoeuro( taler ) {
document.rechner.euro.value = taler / 4;
}
function eurototaler( euro ) {
document.rechner.taler.value = euro * 3;
}
</script>

<form name="rechner">
<table align="center">
<tr>
<td width="50%">Credits:</td>
<td width="50%"><input name="taler" type="text" onkeyup="talertoeuro( this.value );" size="30"></td>
</tr>
<tr>
<td width="50%">NZD:</td>
<td width="50%"><input name="euro" type="text" onkeyup="eurototaler( this.value );" size="30"></td>
</tr>
</table>
</form>
</body>
</html>

And it looks like this. (http://andrehamon.evenhosting.com/creditconverter.html)

Help?

Heinous
04-01-2007, 11:19 AM
Because you're dividing by 4, and only multiplying by 3...?

YouFail
04-01-2007, 11:51 AM
What Heinous said. Try putting 100 into the credits box. Then put 100 into NZD box and its a different figure.

Verrou
05-01-2007, 12:32 AM
Ohhhh i see thanks.
+rep.

Heinous
05-01-2007, 01:12 AM
Ohhhh i see thanks.
+rep.
Just wondering - do you pass mathematics?

Verrou
05-01-2007, 01:28 AM
Yes but not ICT :P And plus the script is in german so it doesnt help :)

Heinous
05-01-2007, 01:37 AM
Yes but not ICT :P And plus the script is in german so it doesnt help :)
That's using mathematic functions..

And I wouldn't advise copy and pasting a script, especially if you don't understand the language it's in.

/ is divide, * is multiply. :\ I'm pretty sure most people, not just programmers, know that.

Verrou
05-01-2007, 10:15 PM
I didn't until then :P
And i see ur from Oz do you play habbo au?

Heinous
06-01-2007, 12:27 AM
I didn't until then :P
And i see ur from Oz do you play habbo au?
Join Date: Dec 2005
Location: Australia
Posts: 536
Infractions: 2/2 (2)
Gender: Male
Habbo UK Name: Heinous [AU]

Want to hide these adverts? Register an account for free!