"Blundell, Steven Paul" wrote:
> 
> The following script updates a field called mr_johnson_count with the
> sentance below and the variable count! If the variable count = 0 it gives
> the correct sentance, if it is 2 or more it gives the correct sentance
> however it doesnt seem to be picking up the if statement that should trigger
> when count = 1. Can anyone shed any light as to why not?
> 



Add two more lines:

>   if count=1 then put "Mr Johnson says there is" && count &" ball in the
> box" into field "mr_johnson_count"
  
else

>  if count=0 then put "Mr Johnson says there are no balls in the box" into
> field "mr_johnson_count"
>   else
>     put "Mr Johnson says there are" && count &" balls in the box" into field
> "mr_johnson_count"
>   end if

end if

>   updatestage

the 'else' portion of the second 'if' was overwriting the results of the
first 'if'.

Look into the 'case' statement.

-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    
--------------------
To gain face, give it
To lose face, try to save it 
Or take it away 
                   - F. Eysenkopf

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to