Jump to content

im lost


only one

Recommended Posts

hi im seting up a fishing function for my rpg, this is my first javascript porject ive ever done, ive learned the basics (i think)

the only problem im having is the reelback(); function,

everytime i click to go to it, it has an error and doesnt work.

anyone have any ideas?

<table>
<tr>
<td style= align="center" width="250" height="20">
<font face=arial color=#000000 size=1><div id="message_html" class="messagehtml" }>Please enable javascript</div></font>
</td>
</tr>
</table>
<script language='Javascript'>
var setup=10;
var casting=5;
var reelback=10;
var waiting=20;

function countdown()
{
if ((0 <= 100) || (0 > 0))
{
xsetup = setup--;
if(xsetup == 0)
{
if (0)
document.getElementById("messagehtml").innerHTML = 'you set up your line';
if (0)
document.getElementById("message_html").innerHTML = 'you set up your line';
cast();
}
if(xsetup > 0)
{
document.getElementById("message_html").innerHTML = 'seting up line '+xsetup+'';
setTimeout('countdown()',1000);
}
}
}
countdown();


function cast()
{

if ((0 <= 100) || (0 > 0))
{
xcasting = casting--;
if(xcasting == 0)
{
if (0)
document.getElementById("messagehtml").innerHTML = 'you set up your line';
if (0)
document.getElementById("message_html").innerHTML = 'you cast out your line';
document.getElementById("message_html").innerHTML = 'wating for bite<br><br><a class="messagehtml"  onclick="reelback();"><u>check bait</u></font></a>';
}
if(xcasting > 0)
{
document.getElementById("message_html").innerHTML = 'casting out line '+xcasting+'';
setTimeout('cast()',1000);
}
}
}

function reelback()
{
if ((0 <= 100) || (0 > 0))
{
xreelback = reelback--;
if(xreelback == 0)
{
if (0)
document.getElementById("messagehtml").innerHTML = 'you set up your line';
if (0)
document.getElementById("message_html").innerHTML = 'you cast out your line';
document.getElementById("message_html").innerHTML = '<a class="messagehtml"  onclick="countdown();">Replace bait</font></a>';
}
if(xreelback > 0)
{
document.getElementById("message_html").innerHTML = 'reeling in line '+xreelback+'';
setTimeout('reelback()',1000);
}
}
}


function wait()
{

if ((0 <= 100) || (0 > 0))
{
xwait = wait--;
if(xwait == 0)
{
if (0)
document.getElementById("messagehtml").innerHTML = 'you set up your line';
if (0)
document.getElementById("message_html").innerHTML = 'you cast out your line';
document.getElementById("message_html").innerHTML = 'You caught one!!<br><br><a class="messagehtml"  onclick="countdown();"><u>Try again</u></font></a>';
}
if(xwait > 0)
{
document.getElementById("message_html").innerHTML = '<br>';
setTimeout('wait()',1000);
}
}
}





function SetCookie(cookieName,cookieValue,nHours)
			{
				var today = new Date();
				var expire = new Date();
				if (Hours==null || nHours==0) Hours=1;
				expire.setTime(today.getTime() + 3600000*Hours);
				document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
			}
</script>

Link to comment
https://forums.phpfreaks.com/topic/45280-im-lost/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.