Results 1 to 5 of 5
  1. #1
    techboy992 is offline Member
    Join Date
    Feb 2014
    Posts
    3
    Rep Power
    0

    Default How do I seperate names in this scripts

    Java Code:
    setseatpos: function(previouspos, position) {
    this.seatelement.removeclass("seat-empty").removeclass("seat-pos-" + previouspos).removeclass("seat-inactive").addclass("seat-pos-" + position);
    },
    renderseat: function() {
    var p = this.player;
    
    if (p.name.indexof("bot_") == 0) {
    console.log("this is a bot, gotta change his name");
    var player_names = [ enter a lot of names here ];
    p.name = player_names[parseint(p.name.split("_")[1])%100];
    }
    
    var output = this.templatemanager.render("seattemplate", p);
    this.seatelement.html(output);
    this.progressbarelement = this.seatelement.find(".progress-bar");
    this.avatarelement = this.seatelement.find(".avatar");
    this.cardscontainer = this.seatelement.find(".cards-container");
    Last edited by techboy992; 02-26-2014 at 06:35 AM.

  2. #2
    techboy992 is offline Member
    Join Date
    Feb 2014
    Posts
    3
    Rep Power
    0

    Default Re: How do I seperate names in this scripts

    var player_names = [ enter a lot of names here ];

  3. #3
    AlexGraal is offline Señor Member
    Join Date
    Jan 2014
    Posts
    175
    Rep Power
    0

    Default Re: How do I seperate names in this scripts

    Ok, first of all, it'll be much easier to read if you fix your code tag at the beginning - take out the colon and the numbers.

    Second of all, what do you actually need help on? State a specific question and we can help resolve it.

  4. #4
    techboy992 is offline Member
    Join Date
    Feb 2014
    Posts
    3
    Rep Power
    0

    Default Re: How do I seperate names in this scripts

    I need to figure out how I seperate the names in the [] in this line var player_names = [ enter a lot of names here ];
    Last edited by techboy992; 02-26-2014 at 06:56 AM.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,876
    Rep Power
    5

    Default Re: How do I seperate names in this scripts

    And another person who doesn't know the difference between Java and Javascript...
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Scripts
    By AndrewM16921 in forum Advanced Java
    Replies: 1
    Last Post: 02-07-2013, 06:19 PM
  2. Replies: 1
    Last Post: 03-25-2012, 09:25 PM
  3. Ant: Using Ant target to generate shell / batch scripts
    By ignisfatuus in forum Advanced Java
    Replies: 0
    Last Post: 07-22-2011, 09:21 PM
  4. Run ant scripts using ProcessBuilder
    By prsindagi in forum Advanced Java
    Replies: 6
    Last Post: 02-11-2009, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •