Jump to content

Recommended Posts

Posted (edited)

still stumped

 

solved--stupid me, should've used string array properly.

 

 

  Reveal hidden contents

 

Edited by 3aq
Posted

welp, I'm still stump. I assume papyrus would function somewhat similar to java and c... but I can't seem to get this to work despite the angle I look from.

        String x[] = {"hi", "hello", "how are you", "goodbye"};
        int  i = 0;
        while(i < x.length) {
            int temp = i+1;
            System.out.println("[" + temp + "]" + " - " + x[i]);
            i++;
Posted (edited)

Adapting functional well known programming language schemes to papyrus, I can tell you will be a royal pain in the butt - it's possible, but you will usually have a small short coming. It's like trying to translate a synthetic language to an analytical language directly, word for word.

String[] strings = new String[5]
strings[0] = "Hello World"
strings[1] = "Hello Earth"
strings[2] = "Hello Universe"
strings[3] = "Hello...?"
strings[4] = "Bye bye"

int i = 0
int index = strings.length

while i < index
    debug.trace("["+i+"] - "+strings[i])
    i += 1
endwhile

That's the closest I could think of to the above snippet you posted. I'm not sure the i+1 part in papyrus will give the expected results, so I left that out. This basically prints the index of the element and the containing string of the element to the log(the closest to system.out I guess).

Edited by Rasikko
Posted

my eyes are open now, you have my sincere gratitude, thank you. =)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...