This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Quote from unscsnip3r»You forgot the item id in the function use item part
Quote from Netherher0brine»Your script should look like this: var zombie; function useItem(x,y,z,itemId,blockId,side) { if(itemId==280) { zombie=Level.spawnMob(x,y+1,z,32,"mob/daady.png"); Entity.setRenderType(zombie,16); } } Note: There isn't a entity id of 54 The render of 1 is no override(that mean blank) custom function is too hard for you,learn later
Quote from undefined »
function useItem(x, y, z, itemId, blockId, side, data){
function spawndaddy() {
var zombie = Level.spawnMob (x, y, z, 54, "mob/daddy.png"); var daddy = Entity.setRenderType (zombie, 1);
zombie;
daddy;
}
}
if (itemId == 280){
spawndaddy();
}
And my error came out this... If you can fix, please help. Also if you see any other mistakes pls tell me! THX for your time
org.mozilla.javascript.EcmaError: ReferenceError: "itemId" is not defined. (test.js#14)
at org.mozilla.javascript.ScriptRuntime.constructError(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.constructError(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.notFoundError(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.name(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(test.js:14)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:235)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:161)
at java.lang.Thread.run(Thread.java:841)
Sorry i dont understand, call me the modpe noob al you want but i put itemId in the function useItem part :\ Like O said call me a noon for not understanding
var zombie;
function useItem(x,y,z,itemId,blockId,side) {
if(itemId==280) {
zombie=Level.spawnMob(x,y+1,z,32,"mob/daady.png");
Entity.setRenderType(zombie,16);
}
}
Note:
There isn't a entity id of 54
The render of 1 is no override(that mean blank)
custom function is too hard for you,learn later
Thanks, yeah i know im getting a little too ahead of my self. Back to the basics!