I get the error "Illegal parameter #1 for function have_skill. Got string, need skill" on the line that reads "if (have_skill ( "Pulverize" )) {"
I've tried tinkering with it, but nothing's working. What am I missing?
I've tried tinkering with it, but nothing's working. What am I missing?
Code:
void smashstuff ( item name, int num ) {
string title;
title = to_string ( name );
if (have_skill ( "Pulverize" )) {
if ( num == 0 )
cli_execute( "pulverize * "+title );
else
cli_execute( "pulverize -"+num+" "+title );
}
else
print ( "You cannot pulverize", "red" );
}