It is always good practice to list commands long to short:
command <look at #@object#;look #@object#>
When the command "look at ball" is entered but the command code is arranged short to long:
command <look #@object#;look at #@object#>
...then Quest uses the first command "look #@object#" and interprets the object as "at ball" and of course cannot find such an object.