Announcement

Collapse
No announcement yet.

Double for-each-loops, reading data from string array

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Double for-each-loops, reading data from string array

    Hi there!

    I want to make a for loop inside of an other for loop, the first one shall read every line from a string array (which is created from a xml file) and the other loop shall read every character from the lines. Does anyone know how it works? Biggest problem is the second loop, how to read every single element from a line and also make a check if the element is a number. I've tried a lot of different functions but nothing works, perhaps the picture below makes my problem more understandable.

    Click image for larger version

Name:	double_forLoop.png
Views:	1
Size:	145.7 KB
ID:	1162288

    To make things clearer, below is a picture of the file I wanna read data from. For instance I want to pick the value 81977 (and hundreds of other values) and print it on the screen.

    Click image for larger version

Name:	XML_prtscr.png
Views:	2
Size:	5.0 KB
ID:	1162289

    #2
    Assuming that the string that you are loading is correct, this looks like it should be working. What is being printed? Try testing it by converting a literal string to an array rather than loading it from a file, and see if that works. Perhaps that function isn't actually splitting it into arrays of the lines of strings.
    Marketplace Assets

    Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
    Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
    Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

    Comment


      #3
      Yep a loop within a loop works fine so there must be some other problem happening. Just hook your print string up straight to the array element and see if there is anything coming out

      Comment

      Working...
      X