Jump to content

problems with papyrus while loops


3aq

Recommended Posts

a snippet of the code:

int n = 1
while n < 3
    n +=
        int o = 0
        while o < 7
            o +=
                int pt_1[n][o]
        endWhile
endWhile

what it's supposed to do is to put out the inner most int pt_1## 24 times.

it works in c

yet in papyrus, it keeps spitting out that I have an E0F at the first while (while n < 3).

just what am I doing wrong and what can I do to correct it?

Edited by 3aq
Link to comment
Share on other sites

"+=" should be "+= 1"

"int pt_1[n][o]" is not something that is going to work in papyrus, you can't have a multidiemsional array (you can fake it with a one dimensional one for many use cases) But I'm not too sure what you want to do there in order to tell you what aproach is good for papyrus.

Link to comment
Share on other sites

whoops forgot to type the ones in (lol)

 

regardless it still isn't..

 

I'll probably have to start off small again and figure out how to put out multiple pages the mcm.with nested functions I suppose..

Link to comment
Share on other sites

welp I figured out what I did wrong, I forgot to incase it in a function(), note to self, take breaks and look at what you code from different angles (you might catch something better).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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