开发者

Giving an Error Object Expected Line 48 Char 1

Giving an Error Object Expected Line 48 Char 1------What did I do wrong???

*****Note Line # are for reference only not on Original Web page************

<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="Leslie Peer" name=author>
<META content="Created with Trellian WebPage" name=description>
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<META content=Index name=keywords>
<STYLE type=text/css>BODY {
 COLOR: #000000; BACKGROUND-REPEAT: repeat; FONT-FAMILY: Accent SF, Arial, Arial Black, Arial Narrow, Century Gothic, Comic Sans MS, Courier, Courier New, Georgia, Microsoft Sans Serif, Monotype Corsiva, Symbol, Tahoma, Times New Roman; BACKGROUND-COLOR: #666666
}
A {
 FONT-SIZE: 14px; FONT-FAMILY: Arial Black, Bookman Old Style, DnD4Attack, Lucida Console, MS Serif, MS Outlook, MS Sans Serif, Rockwell Extra Bold, Roman, Star Time JL, Tahoma, Terminal, Times New Roman, Verdana, Wingdings 2, Wingdings 3, Wingdings
}
A:link {
 COLOR: #9966cc; TEXT-DECORATION: underline
}
A:visited {
 COLOR: #66ff66; TEXT-DECORATION: underline
}
A:hover {
 COLOR: #ffff00; TEXT-DECORATION: underline
}
A:active {
 COLOR: #ff0033; TEXT-DECORATION: underline
}
H1 {
 FONT-SIZE: 25px; COLOR: #9966cc; FONT-FAMILY: Century Gothic
}
H2 {
 FONT-SIZE: 20px; COLOR: #ff33cc; FONT-FAMILY: Century Gothic
}
H3 {
 FONT-SIZE: 18px; COLOR: #6666cc; FONT-FAMILY: Century Gothic
}
H4 {
 FONT-SIZE: 15px; COLOR: #00cc33; FONT-FAMILY: Century Gothic
}
H5 {
 FONT-SIZE: 10px; COLOR: #ffff33; FONT-FAMILY: Century Gothic
}
H6 {
 FONT-SIZE: 5px; COLOR: #996666; FONT-FAMILY: Century Gothic
}
</STYLE>
line 46-<SCRIPT>
line 47- CharNum=6;
line 48-var Character=newArray();Character[0]="Larry Lightfoot";Character[1]="Sam Wrightfield";Character[2]="Gavin Hartfild";Character[3]="Gail Quickfoot";Character[4]="Robert Gragorian";Character[5]="Peter Shain";
line 49-var ExChar=newArray();ExChar[0]="Tabor Bloomfield";
line 50-var Class=newArray();Class[0]="MagicUser";Class[1]="Fighter";Class[2]="Fighter";Class[3]="Thief";Class[4]="Cleric";Class[5]="Fighter";
line 51-line 47var ExClass=newArray();ExClass[0]="MagicUser";
line 52-var Level=newArray();Level[0]="2";Level[1]="1";Level[2]="1";Level[3]="2";Level[4]="2";Level[5]="1";
line 53-var ExLevel=newArray();ExLevel[0]="23";
line 54-var Hpts=newArray();Hpts[0]="6";Hpts[1]="14";Hpts[2]="13";Hpts[3]="8";Hpts[4]="12";Hpts[5]="15";
line 55-var ExHpts=newArray();ExHpts[0]="145";
line 56-var Armor=newArray();Armor[0]="Cloak";Armor[1]="Splinted Armor";Armor[2]="Chain Armor";Armor[3]="Leather Armor";Armor[4]="Chain Armor";Armor[5]="Splinted Armor";
line 57-var ExArmor=newArray();ExArmor[0]="Robe of Protection +5";
line 58-var Ac1=newArray();Ac1[0]="0";Ac1[1]="3";Ac1[2]="3";Ac1[3]="4";Ac1[4]="2";Ac1[5]="3";
line 59-var ExAc=newArray();ExAc[0]="5";
line 60-var Armor1b=newArray();Armor1b[0]="Ring of Protection +1";Armor1b[1]="Small Shield";Armor1b[2]="Small Shield";Armor1b[3]="Wooden Shield";Armor1b[4]="Large Shield";Armor1b[5]="Small Shield";
line 61-var ExArmor1b=newArray();ExArmor1b[0]="Ring of Protection +5";
line 62-var Ac2=newArray();Ac2[0]="1";Ac2[1]="1";Ac2[2]="1";Ac2[3]="1";Ac2[4]="1";Ac2[5]="1";
line 63-var ExAc1b=newArray();ExAc1b[0]="5"
line 64-var Str=newArray();Str[0]="15";Str[1]="16";Str[2]="14";Str[3]="13";Str[4]="14";Str[5]="13";
line 65-var ExStr=newArray();ExStr[0]=21;
line 66-var Int=newArray();Int[0]="17";Int[1]="11";Int[2]="12";Int[3]="13";Int[4]="14";Int[5]="13";
line 67-var ExInt=newArray();ExInt[0]="19";
line 68-var Wis=newArray();Wis[0]="17";Wis[1]="12";Wis[2]="14";Wis[3]="13";Wis[4]="14";Wis[5]="12";
line 69-var ExWis=newArray();ExWis[0]="18";
line 70-var Dex=newArray();Dex[0]="15";Dex[1]="14";Dex[2]="13";Dex[3]="15";Dex[4]="14";Dex[5]="12";
line 71-var ExDex=newArray();ExDex[0]="19";
line 72-var Con=newArray();Con[0]="16";Con[1]="15";Con[2]="16";Con[3]="13";Con[4]="12";Con[5]="10";
line 73-var ExCon=newArray();ExCon[0]="19";
line 74-var Chr=newArray();Chr[0]="16";Chr[1]="14";Chr[2]="13";Chr[3]="12";Chr[4]="14";Chr[5]="13";
line 75-var ExChr=newArray();ExChr[0]="21";
line 76-var Expt=new开发者_JAVA百科Array();Expt[0]="45";Expt[1]="21";Expt[2]="16";Expt[3]="18";Expt[4]="22";Expt[5]="34";
line 77-var ExExpt=newArray();ExExpt[0]="245678";
line 78-var ExBp=newArray();ExBp[0]="Unknown";ExBp[1]="Extrademensional Plane World of Amborsia";ExBp[2]="Evil Wizard Banished for Mass Geniocodes";
line 79-</SCRIPT>
line 80-</HEAD>
line 81-<BODY>

Giving an Error Object Expected Line 48 Char 1------What did I do wrong???

*****Note Line # are for reference only not on Original Web page************


You need a space between new and Array():

var Character = new Array();

The same applies to all the other lines making use of newArray().

Your code will run without errors after replacing all the occurrences of newArray() with new Array(), however as CMS previously suggested, you should consider using the array literal syntax instead:

var Character = ["Larry Lightfoot", "Sam Wrightfield", "Gavin Hartfild",
                 "Gail Quickfoot", "Robert Gragorian", "Peter Shain"];

Which as you can see, is much more readable than:

var Character=new Array();
Character[0]="Larry Lightfoot";
Character[1]="Sam Wrightfield";
Character[2]="Gavin Hartfild";
Character[3]="Gail Quickfoot";
Character[4]="Robert Gragorian";
Character[5]="Peter Shain";


You have characters with high Charisma scores. Everyone knows that Charisma is a dump stat. :-)

That, and the new Array() thing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜