0 Members and 3 Guests are viewing this topic.
if GetPiece(Text,' ',0) = '/create' then begin NewLogin(ID, GetPiece(Text,' ',1),GetPiece(Text,' ',2)); AccName[ID]:= GetPiece(Text,' ',1); end; if GetPiece(Text,' ',0) = '/login' then begin afd :='Players/'+GetPiece(Text,' ',1)+'.txt'; acd:= xsplit(readfile(afd),(chr(13)+chr(10))); if FileExists('Players/'+afd) = False then WriteConsole(ID,'This username does not exist or is incorrect, please try again',$EE81FAA1); if FileExists('Players/'+afd) then begin if GetPiece(Text,' ',2) <> acd[3] then WriteConsole(ID,'This password is incorrect, please try again',$EE81FAA1); if GetPiece(Text,' ',2) = acd[3] then begin Accname[ID]:= acd[2]; WriteConsole(ID,'Login Successful, Welcome Back '+acd[2]+'!',$EE81FAA1); ExistingLogin(ID,acd[2]); end; end; end; end;
if GetPiece(Text,' ',0) = '/login' then begin afd :='Players/'+GetPiece(Text,' ',1)+'.txt'; acd:= xsplit(readfile(afd),(chr(13)+chr(10))); if FileExists(afd) = False then WriteConsole(ID,'This username does not exist or is incorrect, please try again',$EE81FAA1); if FileExists(afd) then begin Writeln(acd[2]); Writeln(acd[1]); if GetPiece(Text,' ',2) <> acd[2] then WriteConsole(ID,'This password is incorrect, please try again',$EE81FAA1); if GetPiece(Text,' ',2) = acd[2] then begin Accname[ID]:= acd[1]; WriteConsole(ID,'Login Successful, Welcome Back '+acd[2]+'!',$EE81FAA1); ExistingLogin(ID,acd[1]); end; end; end;
(10:24:18) Frosty joining game (58.160.74.249:23073)(10:24:18) Frosty has joined alpha team.(10:24:30) /login woah wtf (58.160.74.249 [Frosty])(10:24:34) 30 seconds has passed
Writeln(''+acd[2]+'!'); Writeln(''+acd[1]+'!');
if GetPiece(Text,' ',0) = '/login' then begin // /login < account name > < password > filename := 'Players/'+GetPiece(Text,' ',1)+'.txt'; if FileExists(filename) then begin file_contents := Explode(ReadFile(filename), CRLF); if GetPiece(Text,' ',2) = file_contents[2] then begin Accname[ID]:= file_contents[1]; WriteConsole(ID,'Login Successful, Welcome Back '+Accname[ID]+'!',Color); ExistingLogin(ID,file_contents[1]); end else WriteConsole(ID,'This password is incorrect, please try again',Color); end else begin WriteConsole(ID,'This username does not exist or is incorrect, please try again',Color); end;end;
all im getting is ! in Arsse console, which means it isnt reading the file WTF
(13:52:18) !(13:52:19) !(13:52:19) /login woah wtf (58.160.74.249 [Frosty])
Yes it is defined as a global variable however it is used differently within each section, could it be the problem that its a global var?