Jump to content
  • 0
Gotham

Error whilst adding models

Question

Well, when I try to add my Korasi model, I get a case error.
I'm new to adding models, so all help is appreciated.

Code:
[CODE]/* Hardcoded items start here */
/**/
case 60831:
itemDef.name = "Korasi's sword";
itemDef.description = "The sword of a Void Knight.".getBytes();
itemDef.itemActions = new String[5];
itemDef.itemActions[1] = "Wield";
itemDef.modelID = 60831;
itemDef.anInt165 = 57780;
itemDef.anInt200 = 57780;
itemDef.modelZoom = 1450;
itemDef.modelRotationY = 800;
itemDef.modelRotationX = 1450;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
break;

return itemDef;
}[/CODE]
Error:
[CODE]ItemDef.java:2129: error: orphaned case
case 60831:
^
1 error
Press any key to continue . . .[/CODE]

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
It means there's already the same case elsewhere in your java file.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hash']It means there's already the same case elsewhere in your java file.[/QUOTE]
Well, when I set an Id to a case, what should I use? Because I've tried a variety of numbers and attempted to compile and they all give me the same error.

Share this post


Link to post
Share on other sites
  • 0
Delete the other

[CODE]case 60831:[/CODE]

in your file.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hash']Delete the other

[CODE]case 60831:[/CODE]

in your file.[/QUOTE]
I looked and there was no other case with that same Id. I searched in both the client and the server files.
This also occurs with any number I type in. :l

Share this post


Link to post
Share on other sites
  • 0
This may be a bracket problem, verify that your case is in the switch statement.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hash']This may be a bracket problem, verify that your case is in the switch statement.[/QUOTE]
*Facepalm* You're correct. I completely forgot to add a switch.

*PROBLEM SOLVED* If a mod would please close this, It'd be much appreciated.

Share this post


Link to post
Share on other sites

×