screwed over
03-25-2008, 03:59 PM
I am having some problem with one of my functions:
function CheckLogin(User, Pass)
if File.DoesExist(_WindowsFolder.."\\omGOD DC\\Logins\\"..User..".oel") then
sFold = _TempFolder.."\\omGOD DC\\";
Crypto.BlowfishDecrypt(_WindowsFolder.."\\omGOD DC\\Logins\\"..User..".oel", _TempFolder.."\\"..User..".zip", "pass");
Zip.Extract(_TempFolder.."\\"..User..".zip", {"User.ini"}, _TempFolder.."\\omGOD DC\\"..User, true, true, "pass", ZIP_OVERWRITE_ALWAYS, nil);
ePass = INIFile.GetValue(_TempFolder.."\\omGOD DC\\"..User.."\\User.ini", "UserData", "pDesc");
dPass = Decrypt(ePass);
if Pass == dPass then
Zip.Extract(_TempFolder.."\\"..User..".zip", {"*.*"}, _TempFolder.."\\omGOD DC\\"..User, true, true, "pass", ZIP_OVERWRITE_ALWAYS, nil);
ldTable = {}
ldTable.Correct = true;
ldTable.uPic = _TempFolder.."\\omGOD DC\\"..User.."uPic.img";
ldTable.pDesc = INIFile.GetValue(_TempFolder.."\\omGOD DC\\"..User.."\\User.ini", "UserData", "pDesc");
ldTable.uName = User;
return ldTable
end
else
ldTable = {}
ldTable.Correct = false;
return ldTable
end
end
For some reason it wont return ldTable,and instead i get a nil value (currently only ldTable.Correct though i cant check the others if that wont work until that one does). I dont see why because i have returned tables before in the same way.
Any help would be appreciated.
function CheckLogin(User, Pass)
if File.DoesExist(_WindowsFolder.."\\omGOD DC\\Logins\\"..User..".oel") then
sFold = _TempFolder.."\\omGOD DC\\";
Crypto.BlowfishDecrypt(_WindowsFolder.."\\omGOD DC\\Logins\\"..User..".oel", _TempFolder.."\\"..User..".zip", "pass");
Zip.Extract(_TempFolder.."\\"..User..".zip", {"User.ini"}, _TempFolder.."\\omGOD DC\\"..User, true, true, "pass", ZIP_OVERWRITE_ALWAYS, nil);
ePass = INIFile.GetValue(_TempFolder.."\\omGOD DC\\"..User.."\\User.ini", "UserData", "pDesc");
dPass = Decrypt(ePass);
if Pass == dPass then
Zip.Extract(_TempFolder.."\\"..User..".zip", {"*.*"}, _TempFolder.."\\omGOD DC\\"..User, true, true, "pass", ZIP_OVERWRITE_ALWAYS, nil);
ldTable = {}
ldTable.Correct = true;
ldTable.uPic = _TempFolder.."\\omGOD DC\\"..User.."uPic.img";
ldTable.pDesc = INIFile.GetValue(_TempFolder.."\\omGOD DC\\"..User.."\\User.ini", "UserData", "pDesc");
ldTable.uName = User;
return ldTable
end
else
ldTable = {}
ldTable.Correct = false;
return ldTable
end
end
For some reason it wont return ldTable,and instead i get a nil value (currently only ldTable.Correct though i cant check the others if that wont work until that one does). I dont see why because i have returned tables before in the same way.
Any help would be appreciated.