%math()

Aliases%math( )
Parametersinteger @passValue

    This function enables evaluation of a simple mathematical string. For
instance it can be used to evaluate an instance of a weapon's damage.

Example:

if( %isValid( (@wielded = @actor->eq->wielded) ) )
\ &&
\ %itemIsTypeWeapon( @wielded ) )
{
@damage = %math( @wielded->weapon->damageString )
@actor->hitpoints -= @damage
}
endif

See Also%average()