Log in

View Full Version : Checking highlighted world using WS_CurrentWorld?



wasfer
11-18-2011, 04:07 PM
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
11-18-2011, 04:28 PM
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
11-18-2011, 05:10 PM
Nvm, wont need help, just made another fishy method that does the job.