Announcement

Collapse
No announcement yet.

slic errors...

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

  • slic errors...

    I'm working on coding in slic events for my scenario and I've been getting this error: "...766:yacc stack overflow"

    I know that means its in line 766, but what does yacc stack overflow mean? The only thing I have set so far are regard and trust. This is what 766 is:

    766: LogRegardEvent(14, 16, 100, 0,ID_REGARD_EVENT, 0);
    767: SetTrust(14,16,100);
    768:
    769: LogRegardEvent(15, 16, 100, 0,ID_REGARD_EVENT, 0);
    770: SetTrust(15,16,100);


    Basicly I went through, listed every nations regard for every other nation. By commenting out line 766, the next LogRegardEvent line had an error which is 769. I commented that out an it worked fine. I should also note that those are the last 4 lines in the code and all 765 lines before it look exactly the same as that, except with appropriate values for nations. None of the previous lines seem to have any syntax error either. This really wouldn't be a problem since I can comment the lines out and it works, but then I went and added some new coding after this and then the error was applying to lines in that code.

  • #2
    quote:

    Originally posted by kormer on 01-20-2001 05:36 PM
    I'm working on coding in slic events for my scenario and I've been getting this error: "...766:yacc stack overflow"



    YACC is a program language generator program. It has limits. I think your program was too long, so the stack, which is limited get full. Try to change the logic of your program. I am sure you can make this program shorter or different.

    I hope this help,

    Blade


    Blade

    Comment


    • #3
      Is your file more than 64KB? I believe (from experimenting) that SLIC has the 64KB filesize limitation. At 700-odd lines I'd say it's probably pretty close.

      ------------------
      Author of Diplomod. The mod to fix diplomacy.

      Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."

      Comment


      • #4
        I'm sure it was over 64kb. Kinda sucks you can't have that large a file. Oh well, just one more thing I'll email firaxis to fix.

        Comment


        • #5
          Kormer you'll probably find firaxis can't do anything about the filesize limitation. That 64kb limit has been around since C64-basic. It's just one of those things when you program in any script language.

          ------------------
          Author of Diplomod. The mod to fix diplomacy.

          Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."

          Comment


          • #6
            ummm, the file MS_FUNC.slc is 92kb.

            Comment


            • #7
              I don't think there's a max-size to SLIC files. I know for a fact that the Alexander scenario we're developing has several 64kB+ files and IIRC the standard script.slc file is something like 104kB as well (at least in CtP1, don't know about CtP2). If the stack overflow is related to this, then the total length of all SLIC files should have a max, not individual files (since the files are all read in and the code is parsed line-by-line, regardless of over how many files the lines are distributed) pasted. But for the Alexander scenario we probably have about 300kB SLIC code already (including script.slc and diplomacy.slc and stuff) so that seems unlikely.

              I never saw this error message before so I don't know what it could mean, but I'd say the arguments for LogRegardEvent are in some way incorrect. I wouldn't know what is incorrect about them but I'd suggest you temporarily replace them with values that are certainly correct (values that you used earlier or something you copy from some other mod or scenario or whatever) to test this. If that doesn't cause any problems, you obviously did something wrong with your current values and should try to figure out what. If the problem remains, I haven't got a clue what's going on. If you can't figure this out, email me your file(s) and I'll have a look at them when I have the time.
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #8
                Locutus, this problem is gone now, only cause I took out all the logregardevent functions. Aparently that raises or lowers regard accordingly and doesn't set it to a level. So anyways after hitting end turn once all my regard was set and there was no reason to keep it in there. As for that error, if I commented out the last 2 lines in the file it worked fine, nothing was wrong with those lines either, just a weird bug I guess.

                Comment

                Working...
                X