Matevsz Posted June 2, 2016 Share Posted June 2, 2016 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 Link to comment
Matevsz Posted June 2, 2016 Author Share Posted June 2, 2016 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 Link to comment
ViRuZGamiing Posted June 2, 2016 Share Posted June 2, 2016 You're if is closed but after you close it you start an else state Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now