StartStop with IOwarrior

Hi !

I have made a start/stop-script for IOw24 for the mairlist2x-version-engine. But after the installation of 3x i can’t use it:

procedure OnCartPlayerStop(PlayerControl: IPlayerControl; Item: IPlaylistItem; Duration: int64);
var
i : integer;
begin
if ((PlayerControl.GetState <> PS_PAUSED) and (PlayerControl.GetCaption = ‘11’)) then begin
IOWarriorRemote(0).SetPort(9, true);
for i := 1 to 5000 do;
IOWarriorRemote(0).SetPort(9, false);
end;
if ((PlayerControl.GetState <> PS_PAUSED) and (PlayerControl.GetCaption = ‘12’)) then begin
IOWarriorRemote(0).SetPort(8, true);
for i := 1 to 5000 do;
IOWarriorRemote(0).SetPort(8, false);
end;
end;

i have read the information about the changes, but i’am not a professional programmer. Please help me !!!

RGDS

I assume that it’s Players 11 and 12 you’re looking at here, correct?

They have the internal indices 10 and 11, so the script could be rewritten like this (not tested):

procedure OnCartPlayerStop(PlayerIndex: integer; Duration: int64);
var
  i   : integer;
begin
  if (PlayerIndex= 10) and (Engine.GetCartwall.GetPlayer(10).GetState <> PS_PAUSED) then begin
    IOWarriorRemote(0).SetPort(9, true);
    for i := 1 to 5000 do;
    IOWarriorRemote(0).SetPort(9, false);
   end;
  if (PlayerIndex= 11) and (Engine.GetCartwall.GetPlayer(11).GetState <> PS_PAUSED) then begin
    IOWarriorRemote(0).SetPort(8, true);
    for i := 1 to 5000 do;
    IOWarriorRemote(0).SetPort(8, false);
   end;
end;

Instead of the long for loops, you should use the sleep command, e.g. sleep(500) to delay the processing by 500ms.

Hi Thorben !

Thx for the fast reply, but the script can’t run…

Error: unknown identifer: getcardwall
(FYI: the same errormessage for iowarrior…)

…nope

RGDS

Check your spelling, it’s Cartwall with a T.

The IOWarriorRemote thing is a bug. If you had mentioned the error message (unknown identified) in the first place, it could have been fixed already :wink: Please try to report all errors as exactly as possible. If there’s an error message, write it down and mention it in your post.

The IOWarrior bug has been fixed in the latest snapshot Build 584 which is on its way to the server right now.

Oh, and in case you didn’t know, this is the URL :wink:

http://www.mairlist.com/download/mAirList/v3.0/snapshot/

Regarding the other problem you mentioned on the phone, I did a forum search for “1010” again, and it seems that this particular card is problematic in many ways. Just do that search and see for yourself.

back to the script:

the new script (edit from your side) is online, but i get from mairlist:

15.07.2009 23:14:07 Fehler Fehler beim Laden von C:\Programme\mAirList\scripts\notification\IOW onOff.mls: [Fehler] (5:36): Unknown identifier ‘GETCARTWALL’

:frowning:

Oh, it might be GetCartwallControl. Sorry, I can’t remember that scripting stuff all the time :wink:

16.07.2009 01:19:39 Fehler Fehler beim Laden von C:\Programme\mAirList\scripts\notification\IOW onOff.mls: [Fehler] (5:55): Unknown identifier ‘GETPLAYER’

GetPlayerControl