First off, you should test for syntax errors by typing
verify castlefarming.ash, this should give you valuable information if something isn't written correctly, or if a return value isn't the type that is expected etc...
In this case, you will find out that you should put a
; at the end of each line.
Next,
ashref is your friend. The verify command gave me this error:
Code:
Expected ), found Meat (castlefarming.ash, line 4)
This means something is wrong with line 4:
Code:
boolean outfit( Meat Farming );
(I already added the
;)
First of all,
outfit() isn't a variable, it's a function, so no need to declare it. You would need to declare a variable in which the return value of
outfit() is stored, i.e. if you did something like this:
Code:
boolean OutfitPutOnOK;
OutfitPutOnOK = outfit( Meat Farming );
Since you don't need to store the return value of
outfit(), let's remove the
boolean on line 4, and running the verify command again gives:
Code:
Unknown variable 'Meat' (castlefarming.ash, line 4)
ashref will tell you:
Code:
> ashref outfit
boolean have_outfit( string )
boolean outfit( string )
since
outfit() needs a string, change line 4 to:
Code:
outfit( "Meat Farming" );
Now, after removing every
boolean at the beginning of each line, let's
verify again:
Code:
> verify castlefarming
Unknown variable 'leprechaun' (castlefarming.ash, line 5)
> ashref use_familiar
boolean use_familiar( familiar )
The argument for
use_familiar() needs to be a constant of the type
$familiar, so we change line 5 to:
Code:
use_familiar( $familiar[leprechaun] );
And the debugging continues =)