Jump to content

"Skill Cannot be resolved to a variable"


creationx

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

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