Jump to content
  • 0
Sign in to follow this  
madmonkey

100 errors when adding unspawnble items

Question

hey i am busy to make an pk server based but when i am added items to it and than go compile it gives 100 errors see pictures.
[ATTACH=CONFIG]8394[/ATTACH][ATTACH=CONFIG]8395[/ATTACH]

if anyone can help shall be fine but the items are unspawnble ingame it is not that it doens't work but i fergot some closing but i dont get what i miss if anyone know please answare here or pm me thanks.

Note: i dont do contact whit skype/msn or teamvieuwer i only wanna know how i need to code this.

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0
Because that statement is not Java... I don't know where you got that. What you are looking for is probably this:
[code]if(item == 14484 || item == 11694) {[/code]

Also, a better alternative to capturing and posting images is [url]http://puush.me[/url] . use the [img] tags aswell. Edited by Stacx

Share this post


Link to post
Share on other sites
  • 0
hey thanks alot it worked errors are fixed now :D

can you also tell me how i make it so admins + can spawn it?

Share this post


Link to post
Share on other sites
  • 0
there is 1 problem now lol i cant buy them in a pkp shop to :o

Share this post


Link to post
Share on other sites
  • 0
[quote name='madmonkey']there is 1 problem now lol i cant buy them in a pkp shop to :o[/QUOTE]

Well, find the command used for spawning and paste it here with the [code] tags.

Share this post


Link to post
Share on other sites
  • 0
here i got it.

[QUOTE]if (playerCommand.startsWith("item")) {
/*if(c.Jail == true || c.inWild()) {
c.sendMessage("<col=15007744>******, stop trying to fucking cheat.");
return;
}*/
try {
String[] args = playerCommand.split(" ");
if (args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if ((newItemID <= 25000) && (newItemID >= 0)) {
c.getItems().addItem(newItemID, newItemAmount);
} else {
c.sendMessage("That item ID does not exist.");
}
} else {
c.sendMessage("Wrong usage: (Ex:(::pickup_ID_Amount)(::item 995 1))");
}
} catch(Exception e) {

}
}[/QUOTE] Edited by madmonkey

Share this post


Link to post
Share on other sites
  • 0
Replace
[code]if ((newItemID <= 25000) && (newItemID >= 0)) {[/code]
with
[code]if((newItemID <= 25000 && newItemID >= 0) && (newItemID != 14484 || newItemID != 11694)) {[/code] and remove what I told you to add from the addItem method :)

Share this post


Link to post
Share on other sites
  • 0
okay it worked but where i need added an line to say "you cant spawn this item"? i am did try to put it under like this

[QUOTE]if((newItemID <= 25000 && newItemID >= 0) && (newItemID != 14484 || newItemID != 11694)) {
c.sendMessage("you cant spawn this item");[/QUOTE]

Share this post


Link to post
Share on other sites
  • 0
[quote name='madmonkey']okay it worked but where i need added an line to say "you cant spawn this item"? i am did try to put it under like this[/QUOTE]

replace
[code]c.sendMessage("That item ID does not exist.");[/code]
with the message you want when the item cannot be spawned.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×