Posted February 17, 2018 Hello friends I added now new custom wagons, own style for individual players, i added the first wagon and it works pefect, then added the second in the same code, and now i cant see one of both wagons, than i can just see the last wagon in the code. What i try, nothing is working to put both wagons in one code. Hopefully one of you can take a little look over the code and explayin me my fail....i would be very happy. https://pastebin.com/6PsnSv78 Thanks in advance Eject Share this post Link to post Share on other sites
Posted February 17, 2018 (edited) You are closing the function in line 77, this causes a Syntax Error and the whole code is ignored. Remove line 77, also use some kind of IDE which warns you for syntax errors, you will not jump very far without IDE. I am not really into javascript but I can imagine that declaring variables multiple times like var builder will lead to errors too. Use var builder1, var builder2 and so on instead. Edited February 17, 2018 by Sklo:D Share this post Link to post Share on other sites
Posted February 17, 2018 Thank you Sklo:D Minutes ago i got it to work, but for the second wagon i got just this (?) item (no template found. Could it be that this is because the same names of var builder? than what i see, the mappings text is correct and all graphics are at the right place in the jar file. Eject Share this post Link to post Share on other sites
Posted February 17, 2018 (edited) This is my new code, the second wagon doesnt work (no graphics) https://pastebin.com/QMVbckQF Add: oh, i see now, just the second wagon (that not work) is in the creation menu from the wand) better i make different mods for each wagon Edited February 17, 2018 by Eject Share this post Link to post Share on other sites
Posted February 17, 2018 (edited) If you use builder1 as name you also need to change all later occurences of it too... for example builder.name("klara Wagon", "klara Wagon", "A private wagon created by klara"); must be changed into builder1.name("klara Wagon", "klara Wagon", "A private wagon created by klara"); Edited February 17, 2018 by Sklo:D Share this post Link to post Share on other sites
Posted February 17, 2018 3 minutes ago, Eject said: Oooops Use an IDE to have an automated code check running over your code. Share this post Link to post Share on other sites
Posted February 17, 2018 I am working with dreamweaver, find no way with google to highlight the syntax correct. Also i have intelliJ, but never used for js Eject Share this post Link to post Share on other sites
Posted February 17, 2018 (edited) There was a lot more errors in my code Here is the working template.js, just as example for other admins https://pastebin.com/kwaVmtKV Eject ps: wagon permissions still dont work (no idea how to implement the code)https://github.com/Jubaroo/AddKingdomItemsMod/blob/master/org/takino/mods/AddKingdomItems.java#L74-L90 Edited February 17, 2018 by Eject Share this post Link to post Share on other sites