Using Punctuation in Arrays

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I am still pretty new to this, so hopefully someone can help. I am using array files to hold questions and answers for a trivia game. The array files hold text, numbers, and spaces fine, but it seems to have a problem with punctuation.

    Has anyone experienced this and is there an easy solution?

  • I just did a random test with a simple single field array and had no problem with punctuation if all the punctuation was contained in the quotes " ".

    Is there any specific punctuation you're having a problem with?

    Note that an array must be either a text array or a number array - can't be both. If you want both you need to use 2 different arrays or store the numbers as text.

    Casual games: Please login to see this link.

  • I just did a random test with a simple single field array and had no problem with punctuation if all the punctuation was contained in the quotes " ".

    Is there any specific punctuation you're having a problem with?

    Note that an array must be either a text array or a number array - can't be both. If you want both you need to use 2 different arrays or store the numbers as text.

    And since [MENTION=34976]vertigokeyz[/MENTION] is new I'll just add that to convert numbers to strings and strings to numbers you can use the following: Str$( >Enter number here< ) or Val( >Enter string here< )

  • I just did a random test with a simple single field array and had no problem with punctuation if all the punctuation was contained in the quotes " ".

    Is there any specific punctuation you're having a problem with?

    Note that an array must be either a text array or a number array - can't be both. If you want both you need to use 2 different arrays or store the numbers as text.

    The Array object holds the punctuation fine. The problem occurs when I use the app to save it to a *.arr file, then reload it. The punctuation is always missing.

  • I can't recreate that - I've attached an example.

    Frame 1 writes and saves the array - one of them with a random number so that I can see that it changes.
    Frame 2 clears the array - then after 2 seconds loads the data from the saved file.

    If this doesn't help, perhaps you can post up an example .mfa of the issue you're having, the problem might be something else.

  • I can't recreate that - I've attached an example.

    Frame 1 writes and saves the array - one of them with a random number so that I can see that it changes.
    Frame 2 clears the array - then after 2 seconds loads the data from the saved file.

    If this doesn't help, perhaps you can post up an example .mfa of the issue you're having, the problem might be something else.

    Here is the app I use to make by questions and answers. Let me know if it lets you save text with punctuation.

  • You only write the content of the edit boxes to the array when the Up and Down buttons are pressed.

    If the person saves before pressing the Up or Down buttons then nothing is saved.

    If they save after pressing the Up and Down buttons then it saves correctly and will load again correctly - regardless of the content.


    You can solve this by writing to the array file every time a change has been made - Something like this:

    * Wrong 2: has been modified
    OR
    * Wrong 3: has been modified
    OR
    * Wrong 1: has been modified
    OR
    * Right: has been modified
    OR
    * Question: has been modified[INDENT] Array : Write String Edittext$( "Question" ) to (value( "Counter" ), 1)[/INDENT]
    [INDENT] Array : Write String Edittext$( "Right" ) to (value( "Counter" ), 2)[/INDENT]
    [INDENT] Array : Write String Edittext$( "Wrong 1" ) to (value( "Counter" ), 3)[/INDENT]
    [INDENT] Array : Write String Edittext$( "Wrong 2" ) to (value( "Counter" ), 4)[/INDENT]
    [INDENT] Array : Write String Edittext$( "Wrong 3" ) to (value( "Counter" ), 5)[/INDENT]

    Casual games: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!