Jump to content

Nodes + Abstract Class issue


Gilgad

Recommended Posts

So i've been working on an AIO magic, i've decided to use nodes, now with the abstract class, i've got a boolean execute and a boolean validate.

 

With these two, the validation sends off to the main class whether the sub class that extends the abstract is true, if it is true, it will then execute the code from the execution in that sub class.

 

My question is, for some odd reason, my states, or the switch states, return null, can you not have states outside of the boolean execution? Does it all have to be inside that exeuction?

 

This is the only thing stopping my magic script sad2.png I do a null pointer check and my get states = null so nothing happens, got no idea why.

 

If you'd like to look at a sample of the code and think you have a solution, send me a pm happy.png

 

PS: Cheers to booch for your tutorial man, was great!

Edited by Gilgad
Link to comment
Share on other sites

As long as you have a container for your nodes, which is looped though, you should have no problem with NPE's. Your node class makes you able to keep all of your tasks in one list. Makes is easier to manage. So as long as you have a getState in your node class, you should be fine

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...