• working master mind mpl 2.1

    From dream master@21:1/163 to All on Monday, September 04, 2017 01:21:20
    ok so i am taking the users input via the onekey() how ever it
    s saying itswrong as if you did a duplicate number after you
    enter the 4 guesses.here is what i am doing. i am ad
    ding the ability to quit the gameplay.BTW if you have dm-mm
    v2.0 you can follow along at line 590 to know where iam.. i'
    m sure im missing something simple ch :=onekey('012345
    6789Q',true); if ch = 'Q' then begin exit
    end else instr := str2int(ch); if instr = 0 or instr
    = 1 or instr = 2 or instr = 3 or instr = 4 or instr = 5 or i
    nstr = 6 or instr =7 or instr = 8 or instr = 9 then fn := i
    nstr;i repeat this 4 times making instr sn, tn and ln.
    some how it not seeing they are different numbers.
    any ideas? .úùDre
    am Masterùú. øùú
    ùøøùúùø DoRE!ACiDiC
    !Demonic[dreamland.darktech
    .org]
    --- Mystic BBS v1.12 A35 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From pequito@21:1/163 to dream master on Monday, September 04, 2017 03:42:14
    On 09/04/17, dream master said the following...

    ok so i am taking the users input via the onekey() how ever its saying its wrong as if you did a duplicate number after you enter the 4 guesses.

    here is what i am doing. i am adding the ability to quit the gameplay.
    BTW if you have dm-mm v2.0 you can follow along at line 590 to know where am.. i'm sure im missing something simple

    ch :=onekey('0123456789Q',true);

    Already re-wrote this for DM and got it working for em.

    Cheers!
    Pequito

    --- Mystic BBS v1.12 A35 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From dream master@21:1/163 to pequito on Monday, September 04, 2017 12:33:59
    On 09/04/17, pequito said the following...
    Already re-wrote this for DM and got it working for em.

    well not a rewrite just a change of a couple lines lol

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic |08[|15dreamland|09.|15darktech|09.|15org|08]

    --- Mystic BBS v1.12 A35 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From g00r00@21:1/108 to dream master on Monday, September 04, 2017 12:57:52
    ch :=onekey('0123456789Q',true);
    if ch = 'Q' then
    begin
    exit
    end else

    instr := str2int(ch);
    if instr = 0 or instr = 1 or instr = 2 or instr = 3 or instr = 4
    or instr = 5 or instr = 6 or instr =7 or instr = 8 or instr = 9 then
    fn := instr;

    Since you are using OneKey, you know that if its not a Q then its a valid number, so you dont need that big IF statement.

    Var
    Ch : Char;
    InStr : Byte;
    Begin
    Ch := OneKey('0123456789Q', True);

    If Ch = 'Q' Then Exit;

    // Since we know Q has exited, then the only possible result left is 0-9
    // so no need for an IF statement.

    InStr := Str2Int(Ch);

    WriteLn ('Value of InStr is ' + Int2Str(InStr));
    End;

    --- Mystic BBS v1.12 A35 (Windows/32)
    * Origin: Sector 7 [Mystic BBS WHQ] (21:1/108)
  • From dream master@21:1/163 to g00r00 on Tuesday, September 05, 2017 00:26:09
    On 09/04/17, g00r00 said the following...
    Since you are using OneKey, you know that if its not a Q then its a valid number, so you dont need that big IF statement.
    Var
    Ch : Char;
    InStr : Byte;
    Begin
    Ch := OneKey('0123456789Q', True);
    If Ch = 'Q' Then Exit;

    thank you hmmm for some reason it was saying i had duplicate numbers so pequito told me about onekeyrange so we did that.

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic |08[|15dreamland|09.|15darktech|09.|15org|08]

    --- Mystic BBS v1.12 A35 (Windows/64)
    * Origin: |08--[|15!|07dreamland BBS dreamland.darktech.org (21:1/163)
  • From Pequito@21:1/101 to dream master on Wednesday, September 06, 2017 15:53:23
    On 09/04/17, dream master pondered and said...

    On 09/04/17, pequito said the following...
    Already re-wrote this for DM and got it working for em.

    well not a rewrite just a change of a couple lines lol

    .úùDream Masterùú.

    Thats what I was really covering. =P

    --- Mystic BBS v1.12 A35 (Windows/32)
    * Origin: Agency BBS | telnet://agency.bbs.geek.nz (21:1/101)
  • From Pequito@21:1/101 to g00r00 on Wednesday, September 06, 2017 15:54:51
    On 09/04/17, g00r00 pondered and said...

    ch :=onekey('0123456789Q',true);
    if ch = 'Q' then
    begin
    exit
    end else

    instr := str2int(ch);
    if instr = 0 or instr = 1 or instr = 2 or instr = 3 or instr = 4
    or instr = 5 or instr = 6 or instr =7 or instr = 8 or instr = 9 then
    fn := instr;

    Since you are using OneKey, you know that if its not a Q then its a valid number, so you dont need that big IF statement.

    Var
    Ch : Char;
    InStr : Byte;
    Begin
    Ch := OneKey('0123456789Q', True);

    If Ch = 'Q' Then Exit;

    Wrote it for him like this:
    if not ch = #0 then exit;

    Cheers!
    Pequito

    --- Mystic BBS v1.12 A35 (Windows/32)
    * Origin: Agency BBS | telnet://agency.bbs.geek.nz (21:1/101)