Random numbers

Tagged: , ,

This topic contains 5 replies, has 3 voices, and was last updated by  zxretrosoft 2 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7880

    zxretrosoft
    Participant

    Please, I have only a trivial question. In Monkey2 I can not use the RND command. Maybe it is used differently than in MonkeyX.

    Result: Identifier ‘Rnd’ not found

    Thanks in advance!

    #7881

    abakobo
    Participant

    Do you import and use std?
    Rnd is part of std module.
    At the beginning of your code you should have:

    [/crayon]
    #7882

    zxretrosoft
    Participant

    Thank you very much! This is it! 😉

    #7884

    zxretrosoft
    Participant

    I’m sorry, I’m trying to some basic principles 🙂

    Work with arrays is not clear to me. This is syntactically correct, but does not fill the field? (Array index out of range)

    #7885

    peterigz
    Participant

    You need to create the array with new and specify how many:

    #7886

    zxretrosoft
    Participant

    Great, thank you Peter! 😉

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.