SRL Archive - Help

Checking highlighted world using WS_CurrentWorld?


wasfer

2011-11-18 11:07:52

Function SelectedWorld: Boolean;
var
world: Integer;
begin
OpenWorldScreen;
WS_CurrentWorld(world);
Writeln('Currently the selected world is' + IntToStr(world) );
end;


How do i make this code check what is the world that is currently highlighted?:O
Code i gave is wrong:(

wasfer

2011-11-18 11:28:38

Also tried

Function SwitchWorld: Boolean;
var
CurW: Integer;
begin
FindNormalRandoms;
begin
Writeln('Loging to lobby.');
ExitToLobby;
OpenWorldScreen;
if (WorldScreen) then
begin
WS_CurrentWorld(CurW);
Writeln('Currently in world' + IntToStr(CurW) );
SelectWorld((CurW+1));
LoginPlayer;
SetAngle(True);
end;
end;
end;


But it gets
Currently in world-1
** Warning in FindWorld: World Number cannot be 0**
Failed to find World 0!

As result and just logs back to same world

wasfer

2011-11-18 12:10:36

Nvm, wont need help, just made another fishy method that does the job.