Jump to content

Recommended Posts

Posted

So, in MessageContext I see some stuff returning netHandler. Should I do that?

 

You should still do this and are not.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Posted

On line 64 in your MouseEventHandler class there is a null field.

This is on line 64, I can't tell what is null:

SpearMod.network.sendToServer(new MessageExtendedReachAttack(mov.entityHit.getEntityId()));

Whenever you (or anyone else) reaches such a problem, set a breakpoint and rerun in the debugger.

 

That's a large part of what the debugger is for: Examining what's happening at certain points in a program's execution. In this case, you would have an opportunity to examine every value at work on that line simply by hovering over it, and you would know for certain what was left null. With a few more clicks in Eclipse (or other decent IDE), you might even trace back to where null object should have been set.

 

I don't know why modders are so reluctant to get into the debugger. It's an essential tool. Every programmer should be as comfortable with it as with the editor. Using the debugger is a normal phase of program development that is needed in all but the simplest programs. Every modder should force himself to learn the debugger's basics be ready to jump into it at the first hint of run-time misbehavior.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted
I don't know why modders are so reluctant to get into the debugger. It's an essential tool. Every programmer should be as comfortable with it as with the editor.

 

I know for myself it comes from having used IDEs that don't have debuggers* or which have really shitty ones.**  So I had to resort to other techniques of getting at the same information.  So I forget it exists, but I'm recovering slowly.

 

*Unity, because the engine where you run things isn't the same program where you write code.

**Flash's debugger is ungodly piss-poor at showing you anything useful.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.