Jump to content

Recommended Posts

Posted (edited)

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
Posted

"+=" 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.

Posted

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..

Posted

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).

Posted

Again I say I wish we had for loops, etc. I mean papyrus was created with C++ after all. All the neat things you can do with for loops, requires extra steps with ol' dinosaur while loop.

  • Recently Browsing   0 members

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