Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Jscript
➜ Accessing Array Elements
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Kromlech
USA (1 post) Bio
|
| Date
| Sat 23 Nov 2002 04:10 AM (UTC) |
| Message
| Ok, I have a book on Jscript that says "You can read the contents of an array using the same notation you used when assigning walues." I tried to do what it said but I gave up so here is my script.
function NumericTest3 (thename, theoutput, thewildcardsVB)
{
scores = new Array()
scoredisp = "Scores; + scores[0] + "," + scores[1] + "," + scores[2]"
world.send("\" " + scoredisp)
}
When it sends it to the world all it sends is
Scores; + scores[0] +
I want to display the values of the first three elements of the scores array. Does anybody know how to get this to work?
|
Hmm...what pop is better Pepsi or Coke? | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #1 on Sat 23 Nov 2002 04:20 AM (UTC) |
| Message
| Umm.. Well, you have your "" all messed up. "" should be 'only' around literal information (things not stored in a variable). Thus:
scoredisp = "Scores;" + scores[0] + "," + scores[1] + "," + scores[2];
will work, but not the way you had it. ;) | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,205 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top