I'm translating a Pascal procedure in Python
Although, if I ask to Print I get this error in the Sysjornal
NameError: name 'BMSearch' is not defined
Code: Select all
def setupBooks():
FindType(BulkBookType,Backpack())
#print(FindItem())
print(BMSearch(FindItem(),info,'Black'))
Code: Select all
procedure setupBooks;
var
info : String;
begin
while FindType(BulkBookType,backpack) > 0 do
begin
info := GetCliloc(FindItem);
if BMSearch(1,info,'Black') > 0 then
begin
BBook:=FindItem;
Ignore(FindItem);
end
else
begin
if BMSearch(1,info,'Tailor') >0 then
TBook:=FindItem;
Ignore(FindItem);
end;
end;
IgnoreReset;
AddToSystemJournal('Tailor book id :'+IntToStr(TBook));
AddToSystemJournal('Black book id :'+IntToStr(BBook));
AddToSystemJournal('Book setup success');
end;