joey0101
01-14-2007, 02:11 PM
im trying to write a air crafter and when testing certain procedures i came across certain bugs, the code samples below both contain errors and i don't know why can anyone help me.
program aircrafter;
var airrmade, i:integer;
const
tripstomake = 100000;//Amount of essence you want to convert
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\RuneCrafting.scar}
procedure DeclarePlayers;
begin
howmanyplayers:= 2;
NumberOfPlayers(howmanyplayers);
currentplayer:= 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''
Players[1].Active := true;
end;
function findtally:boolean;
begin
LoadSRlTalismanBitmaps;
if(not FindTalismanInInventory('air', 12)) then
begin
Writeln('you do not have an air Talisman... logging out');
result:= false;
logout;
NextPlayer(false);
end;
end;
procedure gettoalter;
begin
perfectnorth;
end;
begin
setupsrl;
LoadSRlTalismanBitmaps;
DeclarePlayers;
LoginPlayer;
repeat
if (findtally) then
begin
break;
end;
until(findtally = true);
writeln('hello');
end.
Error = Loop is endless even when i have a talisman in my inventory.
program aircrafter;
var airrmade, i:integer;
const
tripstomake = 100000;//Amount of essence you want to convert
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\RuneCrafting.scar}
procedure DeclarePlayers;
begin
howmanyplayers:= 2;
NumberOfPlayers(howmanyplayers);
currentplayer:= 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''
Players[1].Active := true;
end;
function findtally:boolean;
begin
LoadSRlTalismanBitmaps;
if(not FindTalismanInInventory('air', 12)) then
begin
Writeln('you do not have an air Talisman... logging out');
result:= false;
logout;
NextPlayer(false);
end;
end;
procedure gettoalter;
begin
perfectnorth;
end;
begin
setupsrl;
LoadSRlTalismanBitmaps;
DeclarePlayers;
LoginPlayer;
repeat
if (findtally) then
begin
break;
end;
until(FindTalismanInInventory('air', 12));
writeln('hello');
end.
Error = [Runtime Error] : Exception: Access violation at address 00650C79 in module 'scar.exe'. Read of address 00000030 in line 324 in script C:\Program Files\SCAR 2.03\includes\SRL\SRL\Skill\RuneCrafting.scar
does anyone know whats wrong
program aircrafter;
var airrmade, i:integer;
const
tripstomake = 100000;//Amount of essence you want to convert
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\RuneCrafting.scar}
procedure DeclarePlayers;
begin
howmanyplayers:= 2;
NumberOfPlayers(howmanyplayers);
currentplayer:= 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''
Players[1].Active := true;
end;
function findtally:boolean;
begin
LoadSRlTalismanBitmaps;
if(not FindTalismanInInventory('air', 12)) then
begin
Writeln('you do not have an air Talisman... logging out');
result:= false;
logout;
NextPlayer(false);
end;
end;
procedure gettoalter;
begin
perfectnorth;
end;
begin
setupsrl;
LoadSRlTalismanBitmaps;
DeclarePlayers;
LoginPlayer;
repeat
if (findtally) then
begin
break;
end;
until(findtally = true);
writeln('hello');
end.
Error = Loop is endless even when i have a talisman in my inventory.
program aircrafter;
var airrmade, i:integer;
const
tripstomake = 100000;//Amount of essence you want to convert
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\RuneCrafting.scar}
procedure DeclarePlayers;
begin
howmanyplayers:= 2;
NumberOfPlayers(howmanyplayers);
currentplayer:= 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''
Players[1].Active := true;
end;
function findtally:boolean;
begin
LoadSRlTalismanBitmaps;
if(not FindTalismanInInventory('air', 12)) then
begin
Writeln('you do not have an air Talisman... logging out');
result:= false;
logout;
NextPlayer(false);
end;
end;
procedure gettoalter;
begin
perfectnorth;
end;
begin
setupsrl;
LoadSRlTalismanBitmaps;
DeclarePlayers;
LoginPlayer;
repeat
if (findtally) then
begin
break;
end;
until(FindTalismanInInventory('air', 12));
writeln('hello');
end.
Error = [Runtime Error] : Exception: Access violation at address 00650C79 in module 'scar.exe'. Read of address 00000030 in line 324 in script C:\Program Files\SCAR 2.03\includes\SRL\SRL\Skill\RuneCrafting.scar
does anyone know whats wrong