Bug - Not A Bug boolean use_skill( skill to_use ) doesn't actually return a boolean

The wiki lists:
boolean use_skill( skill to_use )

However, when I try to do this in a consult script:
Code:
void main(int round, monster foe, string page) {
    if(!use_skill($skill[Fist of the Mummy])) {
        print("Failed to use Fist of the Mummy!");
    }
}

... I get "!" operator requires a boolean value (test.ash, line 2)

Did this function get changed sometime after the wiki page was last updated? Is there a good reason it's no longer returning a boolean? If not, can it be changed back?
 

lostcalpolydude

Developer
Staff member
Check out "ashref use_skill" to see that it returns a buffer (someone should update the wiki), which I will respond to your other post to explain how that's exactly what you want.
 

Bale

Minion
(someone should update the wiki)

Information is on the wiki. It could be made clearer at the top of the page though, before both the "normal use" and "in-combat consulting" headers that it returns a buffer when used during combat.
 
Last edited:

heeheehee

Developer
Staff member
Oi, I promise that wasn't me!

Aside, that claim has been there for a few years. Strange how nobody noticed it earlier...

edit: Bale, the wiki info is just straight-up wrong. I'm in the middle of fixing the page to at least make sense.
 
Thanks for the help, lostcalpolydude, and the edit, heeheehee. Totally my fault for just skimming the page instead of actually reading it. I haven't run across a wiki page that had multiple forms of the function listed throughout, rather than together at the top.
 
Top