Thread Tools
Old January 20, 2001, 18:36   #1
kormer
Chieftain
 
Local Time: 09:51
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
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.
kormer is offline  
Old January 22, 2001, 06:57   #2
Blade Runner
Prince
 
Blade Runner's Avatar
 
Local Time: 10:51
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Belgium
Posts: 301
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 Runner is offline  
Old January 22, 2001, 16:16   #3
Dale
Emperor
 
Dale's Avatar
 
Local Time: 19:51
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
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."
Dale is offline  
Old January 22, 2001, 19:21   #4
kormer
Chieftain
 
Local Time: 09:51
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
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.
kormer is offline  
Old January 22, 2001, 20:44   #5
Dale
Emperor
 
Dale's Avatar
 
Local Time: 19:51
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
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."
Dale is offline  
Old January 23, 2001, 02:38   #6
heardie
Prince
 
heardie's Avatar
 
Local Time: 20:51
Local Date: October 31, 2010
Join Date: Aug 1999
Posts: 684
ummm, the file MS_FUNC.slc is 92kb.
heardie is offline  
Old January 23, 2001, 09:17   #7
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:51
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
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.
Locutus is offline  
Old January 23, 2001, 12:18   #8
kormer
Chieftain
 
Local Time: 09:51
Local Date: October 31, 2010
Join Date: Jan 2001
Posts: 58
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.
kormer is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:51.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team