Jump to content

"Skill Cannot be resolved to a variable"


Recommended Posts

Posted

Im making a simple magic bot right now and am trying to create a paint that will log the levels. I'm following this tutorial:

 

http://osbot.org/forum/topic/59590-the-full-paint-tutorial-all-aspects-covered-pug-tutorials/

 

Everything seems to be coded correctly, however when I have the code

currentLevel = skills.getStatic(Skill.MAGIC);

it highlights "Skill" before "Skill.MAGIC" and says that

 

"Skill Cannot be resolved to a variable"

 

What am I doing wrong?

Posted

Ok I'm not sure what happened, but when I typed the WHOLE code out it gave me an error, but if I stopped at "skills.getStatic(Skill." , waited for the drop down menu, and clicked the MAGIC option, it works fine.

 

I'm not sure what went wrong here. Sorry about the needless post. mods may close/delete if need be.

The code would've worked if you'd had the import, the only reason typing it slowly fixed it is selecting the option automatically gives the import.

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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