BorderlandsPsycho
2014-10-12 14:26:40
Hi! I just decided to try and pick up SRL, I tried a few years ago but had no coding experience so it didnt work out. I ended up moving to Java, I now have a very solid understanding of Java, and I thought I would give this a try now. I'm having a bit of an issue however, and I am attempting to figure out if it is a client side error or if I am missing something in my coding. I have tried a myriad of things, but nothing seems to work.
Basically the problem is getting code to run once I have logged in. I created a simple script to explain the issue, it is below. When I run the program, which I expect to setup the client, and login (which it does), it then declines to print anything. Neither 'Not Logged In' nor 'Is Logged In' prints, the character just sits and does nothing. However, if I wait about a minutes, the program gets an error and begins rapidly printing out "Not Logged In" I will include a sample of that below the program.
Thanks for your help!
Basically the problem is getting code to run once I have logged in. I created a simple script to explain the issue, it is below. When I run the program, which I expect to setup the client, and login (which it does), it then declines to print anything. Neither 'Not Logged In' nor 'Is Logged In' prints, the character just sits and does nothing. However, if I wait about a minutes, the program gets an error and begins rapidly printing out "Not Logged In" I will include a sample of that below the program.
Thanks for your help!
program testProgram;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$I SPS/lib/SPS-RS3.Simba}
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'my email';
password := 'my password';
isActive := true;
world := -1;
isMember := false;
end
currentPlayer := 0;
players[currentPlayer].login();
end;
procedure testWorking;
begin
if not(isLoggedIn()) then
begin
print('Not Logged In');
exit;
end;
if (isLoggedIn()) then
begin
print('Is Logged In');
end;
end;
begin
clearDebug();
setupSRL();
declarePlayers();
repeat
testWorking;
until(false);
end.---- WARNING: Unknown login string: ""
---- HINT: Please report this issue in the SRL bugs section of the forum
------ Saving screenshot: unknown_login_count.png
---- Login response: One minute as passed...
------ All players inactive...
-- TPlayer.login(): False
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In
-- Not Logged In