Jump to content




[ERROR] 'then' expected


  • You cannot reply to this topic
5 replies to this topic

#1 LDShadowLord

  • Members
  • 115 posts

Posted 23 December 2012 - 12:15 AM

Ok, I'm attempting to revive an old program I found to do what I wanted and this error keeps popping up.
Password = a.readLine()
					    YourCurrent = tonumber(a.readLine())
					    YourPay = tonumber(tWords[4])
					    a.close()
					  
					    if tWords[3] == Password and fs.exists("Accounts/" ..tWords[5]) then
							    if YourCurrent > YourPay pr YourCurrent == YourPay then                           <------- Error Line
									    test = fs.open("Accounts/" ..tWords[5], "r")
									    TheirPass = test.readLine()
									    TheirCurrency = tonumber(test.readLine())
									    test.close()
That error line is where it says I need to put a then but I have one and I have a double '=='. could anyone shed some light on the subject?

#2 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 23 December 2012 - 12:17 AM

if YourCurrent > YourPay pr YourCurrent == YourPay then 
"pr" .. did you re-write the code or copy paste?

#3 NDFJay

  • Members
  • 216 posts
  • LocationLeeds, England

Posted 23 December 2012 - 12:26 AM

View PostremiX, on 23 December 2012 - 12:17 AM, said:

if YourCurrent > YourPay pr YourCurrent == YourPay then 
"pr" .. did you re-write the code or copy paste?

think he re-write it... a little typo can make a big error

solution to the problem change "pr" to "or"

#4 LDShadowLord

  • Members
  • 115 posts

Posted 23 December 2012 - 12:56 AM

Jeesh, im a f****ng indiot. Thanks guys. I'll go shoot myself now.

#5 ChunLing

  • Members
  • 2,027 posts

Posted 23 December 2012 - 02:21 AM

That could be more idiotic than making a typo substituting "p" for "o".

Just sayin'.

#6 Doyle3694

  • Members
  • 815 posts

Posted 23 December 2012 - 03:39 AM

then if pressing you middle finger 1 cm to much to the left is idiotic, that is another question.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users