Jump to content

<eof> near end


Matevsz

Recommended Posts

Posted

Hi, i have problem, DB3: expected near end line 177

  
165 local login, password = loadLoginFromXML() 
166 
167 
168 if not(login == "" or password == "") then 
169 guiCheckBoxGetSelected(save_account, true) 
170 guiSetText(edit_login, tostring(login)) 
171 guiSetText(edit_password, tostring(password)) 
172 else 
173 guiCheckBoxGetSelected(save_account, false) 
174 guiSetText(edit_login, tostring(login)) 
175 guiSetText(edit_password, tostring(password)) 
176 end 
177 end 
  

Posted

I tried,

DB3: 'end' expected to close 'function' at line 181, near 'else'

  
165 local login, password = loadLoginFromXML() 
166 
167 
168 if not(login == "" or password == "") then 
169 guiCheckBoxGetSelected(save_account, true) 
170 guiSetText(edit_login, tostring(login)) 
171 guiSetText(edit_password, tostring(password)) 
172 else 
173 guiCheckBoxGetSelected(save_account, false) 
174 guiSetText(edit_login, tostring(login)) 
175 guiSetText(edit_password, tostring(password)) 
176 end 
177 end 
178 
179 
180 
181 function loadLoginFromXML() 
182 local xml_save_log_File = xmlLoadFile("Files/xml/userdata.xml") 
183 if not xml_save_log_File then 
184     xml_save_log_File = xmlCreateFile("Files/xml/userdata.xml", "login") 
185 end 
186 local usernameNode = xmlFindChild(xml_save_log_File, "login", 0) 
187 local passwordNode = xmlFindChild(xml_save_log_File, "password", 0) 
188     return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) 
189 else 
190     return "","" 
191 end 
192 xmlUnloadFile(xml_save_log_File) 
193 end 
  

Posted

You're if is closed but after you close it you start an else state

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...