newb that is having problems...

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Wynn
Posts: 4
Joined: Mon Jul 12, 2010 10:16 am

newb that is having problems...

Post by Wynn » Mon Jul 12, 2010 11:41 am

hi! i'm rather new to revolution media and have been trying to get my head around the syntax. I need help with a few things.
i need to make numbered 'boundaries', between certain numbers, you get a certain output if that number is inserted into a text field.

Image
this is the error i encounter and want to be able to get round this, any ideas?

-Wynn

Klaus
Posts: 14193
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: newb that is having problems...

Post by Klaus » Mon Jul 12, 2010 1:42 pm

Hi Wynn,

you have to check every condition separately and use the correct syntax :)

1. Get the content of the field (Everything in a field is TEXT, so you cannot write "...number in field XYZ"!)
2. Check BOTH conditons, see below!
3 NO period at the end of a script line :D!

Code: Select all

on mouseup
   put fld "studentmark" into tNumber
   ## Now check the TWO conditions:
   if tNumber >= 0 AND tNumber <= 40 then
     answer "Fail!"
  end if
end mouseup
Best from germany

Klaus

Wynn
Posts: 4
Joined: Mon Jul 12, 2010 10:16 am

Re: newb that is having problems...

Post by Wynn » Mon Jul 12, 2010 1:51 pm

oh wow thanks Klaus, it makes sense now!

Post Reply