I wasn't sure if this really goes in the map topics or mod because I'm using a mod for a map.I'm not a very good coder but I made a mod that can go in the map well..I Just need help on syntax errors.Do you think you can help me with 2?Look I'm sorry if I'm wasting your time but I believe both mods have the same error.Here's the mod I was going to use for the map.
[quote]tion newLevel() {
clientMessage(ChatColor.LIGHT_PURPLE + "Welcome!Do /story1 for story!");
}function procCmd(command) {
var cmd = command.split(" ");
var myCommand = "story1";
var myCommand2 = "story2";
var myCommand3 = "story3";
var myCommand4 = "story4";
var party = "party";
if(cmd[0] == myCommand) {
clientMessage(ChatColor.LIGHT_PURPLE + "It all starts on where YOU are.The house burned down because while you were at a party it was griefed.Your parents are on vaction and will be back soon!You have some time to your self to fix the house and extra time to work on your spaceship!Follow torches to go to places and READ SIGNS for instructions.You have 2 months by yourself.1 month you'll spend on the house and the other on the space ship.You have to live on your tree house for now..");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand2) {
clientMessage(ChatColor.LIGHT_PURPLE + "The tickets are for the spaceship.Just pretend it's fuel you need a lot of them ok?And the other stuff like dirt well...I had no place to put them..");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand3) {
clientMessage(ChatColor.LIGHT_PURPLE + "To get the spaceship working just find an elevator piece and 8 Limiter blocks!After that get to the bottom of the spaceship and place the blocks there with the elevator block JUST right under the spaceship!Do /story 4 when your done!");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand4) {
clientMessage(ChatColor.RED + "Now go inside the spaceship!And press some buttons(open fence gates)To lift off.LIfting off in 3...2... 1... LIFT OFF! WAIT!You forgot to set up the controls!You can't stop the plane! It's heading toward the sun! NO! TAKE COVER!!!!TO be continued.. Meanwhile let's do /party to party!!Cause the map part 1 is over!");
clientMessage(" ");
}
}
else if (cmd[0] == party) {
function addItemInventory(46,64,0);
function addItemInventory(259,1,0);
function addItemInventory(364,64,0);
}
function newLevel() {
clientMessage(ChatColor.LIGHT_PURPLE + "Welcome!Do /storya for story!");
}
function procCmd(command) {
var cmd = command.split(" ");
var myCommand = "storya";
var myCommand2 = "talk1";
var myCommand3 = "talk2";
var myCommand4 = "storyd";
var party = "partay";
if(cmd[0] == myCommand) {
clientMessage(ChatColor.LIGHT_PURPLE + "Look's like you've landed on planet lightcraft.It was near the sun...Can't belive you broke the sun!That unknown block is strong look at the spaceship!It's stuck though..Talk to one of the aliens!");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand2) {
clientMessage(ChatColor.LIGHT_PURPLE + "HI!I saw how you crushed the sun!Don't worry I can help you!Just craft or find the majestic glowstone!You need 8 glowstone dust and orange dye!To get orange dye find flowers that will make a dye which will make orange dye when the flower dyes is mixed!Easy right?! ");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand3) {
clientMessage(ChatColor.LIGHT_PURPLE + "You want a die?Oh I've got plenty from playing snakes and ladders.Oh what's that?Not that kind of die OH you mean dye!Well there's flowers at the core of lightcraft.By the way core means the center of this planet.");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand4) {
clientMessage(ChatColor.RED + "You found the ore!Just go to the bridge to the sun and place the glowstone on the middle of the obsidian blocks!When your done do /partay!");
clientMessage(" ");
}
}
else if (cmd[0] == party) {
function addItemInventory(46,64,0);
function addItemInventory(259,1,0);
function addItemInventory(364,64,0);
}
}
Can anyone help me? Please.. And it's on pocket edition not a pc mod.
Are you aware that Minecraft mods are (usually) written in Java, not JavaScript (which is what your code appears to be)? Are you using a mod that can be scripted in JavaScript?
In JavaScript, the function keyword is only used to declare a new function, not to call an existing function. Remove it from your addItemInventory lines.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Oh yeah and what's "var"? This isn't a valid Java type. Didn't notice any of this.... You're using the wrong language or some API we don't know about (MCreator?)
This forum is for PC edition mods. Pocket Edition has its own forum here.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
[quote]tion newLevel() {
clientMessage(ChatColor.LIGHT_PURPLE + "Welcome!Do /story1 for story!");
}function procCmd(command) {
var cmd = command.split(" ");
var myCommand = "story1";
var myCommand2 = "story2";
var myCommand3 = "story3";
var myCommand4 = "story4";
var party = "party";
if(cmd[0] == myCommand) {
clientMessage(ChatColor.LIGHT_PURPLE + "It all starts on where YOU are.The house burned down because while you were at a party it was griefed.Your parents are on vaction and will be back soon!You have some time to your self to fix the house and extra time to work on your spaceship!Follow torches to go to places and READ SIGNS for instructions.You have 2 months by yourself.1 month you'll spend on the house and the other on the space ship.You have to live on your tree house for now..");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand2) {
clientMessage(ChatColor.LIGHT_PURPLE + "The tickets are for the spaceship.Just pretend it's fuel you need a lot of them ok?And the other stuff like dirt well...I had no place to put them..");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand3) {
clientMessage(ChatColor.LIGHT_PURPLE + "To get the spaceship working just find an elevator piece and 8 Limiter blocks!After that get to the bottom of the spaceship and place the blocks there with the elevator block JUST right under the spaceship!Do /story 4 when your done!");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand4) {
clientMessage(ChatColor.RED + "Now go inside the spaceship!And press some buttons(open fence gates)To lift off.LIfting off in 3...2... 1... LIFT OFF! WAIT!You forgot to set up the controls!You can't stop the plane! It's heading toward the sun! NO! TAKE COVER!!!!TO be continued.. Meanwhile let's do /party to party!!Cause the map part 1 is over!");
clientMessage(" ");
}
}
else if (cmd[0] == party) {
function addItemInventory(46,64,0);
function addItemInventory(259,1,0);
function addItemInventory(364,64,0);
}
function newLevel() {
clientMessage(ChatColor.LIGHT_PURPLE + "Welcome!Do /storya for story!");
}
function procCmd(command) {
var cmd = command.split(" ");
var myCommand = "storya";
var myCommand2 = "talk1";
var myCommand3 = "talk2";
var myCommand4 = "storyd";
var party = "partay";
if(cmd[0] == myCommand) {
clientMessage(ChatColor.LIGHT_PURPLE + "Look's like you've landed on planet lightcraft.It was near the sun...Can't belive you broke the sun!That unknown block is strong look at the spaceship!It's stuck though..Talk to one of the aliens!");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand2) {
clientMessage(ChatColor.LIGHT_PURPLE + "HI!I saw how you crushed the sun!Don't worry I can help you!Just craft or find the majestic glowstone!You need 8 glowstone dust and orange dye!To get orange dye find flowers that will make a dye which will make orange dye when the flower dyes is mixed!Easy right?! ");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand3) {
clientMessage(ChatColor.LIGHT_PURPLE + "You want a die?Oh I've got plenty from playing snakes and ladders.Oh what's that?Not that kind of die OH you mean dye!Well there's flowers at the core of lightcraft.By the way core means the center of this planet.");
clientMessage(" ");
}
}
else if (cmd[0] == myCommand4) {
clientMessage(ChatColor.RED + "You found the ore!Just go to the bridge to the sun and place the glowstone on the middle of the obsidian blocks!When your done do /partay!");
clientMessage(" ");
}
}
else if (cmd[0] == party) {
function addItemInventory(46,64,0);
function addItemInventory(259,1,0);
function addItemInventory(364,64,0);
}
}
Can anyone help me? Please.. And it's on pocket edition not a pc mod.
that ^
In JavaScript, the function keyword is only used to declare a new function, not to call an existing function. Remove it from your addItemInventory lines.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
This forum is for PC edition mods. Pocket Edition has its own forum here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.