Click to See Complete Forum and Search --> : Help with game code.
On_fire
04-06-2004, 06:38 PM
I am trying to make an mmorpg(similar to cybots) in javascript. Kinda weird choice of a language for something like this I know, but I should be able to pull it off, however I am having some trouble with it. It uses cookies to store information, and probably post or something for the multi-player part. however after redoing the cookie scripts now all sorts of errors popup and I can't get rid of them.
Here is the code. (http://kgemods.com/code.htm)
Well thats all for now as I got to go, I'll put up the rest when I get back.
On_fire
04-07-2004, 03:03 AM
Ok, I think most of the code is there. Pardon the comment's spelling and grammar, I was trying to hurry and get them done. (That and it is 2:55 am here.) I know alot of functions are probably set up wrong, but I have never taken a course(Online or otherwise.) or anything for javascript, so I have very little idea what the heck I am doing, however the best way to learn is to get out there get your hands dirty and ask someone else about what ever you can't figure out.
On_fire
04-07-2004, 05:00 PM
Ok now that i've had some time to debug this thing, there are errors on lines:
8 in home.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="cookies.js"></script>
<script language="JavaScript" type="text/JavaScript">
var name = getVar("stats", "[0]")
document.write("Hello ");
document.write(name);
document.write(", Welcome to <em>The Great War</em>.");
</script>
</head>
hmm the problem is probably in the getVar function:
function getVar(array, value)
{
jarray = getCookie(array)
var decodecook = array.split(";")
var getVal = (array, value);
return getVal;
}
line 8 in battle.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="cookies.js"></script>
<script language="JavaScript" type="text/JavaScript">
battlewrite()
</script>
</head>
<body bgcolor="#000000" text="#FFFFFF" link="#0000FF">
</body>
</html>
That's what I can see for now. No doubt others will show up.