bn880 5 Posted September 19, 2003 Hi all, you must hate me by now bringing you all these in-depth bug reports. Lets begin on my/CoC findings: In OFP 1.91,1.92 (you get the picture) there are several savegame bugs, ok maybe 2, but one has been solved a few days ago during the course of our CoC projects. That is preProcessed functions, or any functions/strings pre-loaded into variables will be cut off at 4096Bytes upon mission load. This is something that can bite you in the rear quite hard as perfectly functional scripts which have variables filled with functions or strings will not have those variables restored beyond 4096Bytes and will basically report errors on screen. This is 1 of the savegame bugs, the major revision of the savegame bug remains unsolved but I certainly think this gives us a clue as to what's going on. More notes; don't forget about global functions/strings saved into global variables, they will also be cut off no matter if an SQS was running or not, you will simply have truncated data on your hands. Solution is * Do not create strings or load sqf files larger than 4096 Bytes, if you have already got large sqf files then: A and/or B below A) subdivide your functions into blocks no larger than 4096Bytes to put into local variables B) use loadFile "\filename.sqf" every time you use a function. (actually this is recommended for Addons since the memory space is shared AFAIK) Thanks for your time... umm, I guess it's the other way around Share this post Link to post Share on other sites
bn880 5 Posted September 19, 2003 If you want a demonstration: sample Start mission start test (action menu) save game load game (notice bug) Then try removing a character or two (one of the a's) from the test script. Repeat procedure above and notice bug is gone. Share this post Link to post Share on other sites
dinger 1 Posted September 20, 2003 Once again, Bn880 saves my butt by isolating an OFP bug. If you're getting mysterious error messages in functions after a restoring from a saved game, this is why. Share this post Link to post Share on other sites
canukausiuka 1 Posted September 20, 2003 Is this possibly the reason that OFPEC blood gives errors after a reload? Share this post Link to post Share on other sites
dinger 1 Posted September 20, 2003 If OFPEC_Blood creates its drop effects by calling a large function stored in global variable space, yes. (and I haven't seen OFPEC_Blood, but I suspect that is the case) Share this post Link to post Share on other sites
RED 0 Posted September 20, 2003 Great work! The OFPEC blood is fixed with the ECP pack, this should be released soonish. RED Share this post Link to post Share on other sites
killswitch 19 Posted September 20, 2003 Is this possibly the reason that OFPEC blood gives errors after a reload? The OFPEC Blood addon/scripts as of ver. 1.41 do not use preloaded functions, nor do they use scripts larger than 4 kB in the way described by bn880, so that is not the problem. Can you describe in what way "OFPEC blood gives errors after a reload"?. It may be that what you believe is a error in the blood scripts is related to the savegame/event handling bug. @RED: In what way is the blood stuff "fixed" in the ECP? Share this post Link to post Share on other sites
RED 0 Posted September 20, 2003 There have been a few improvements to the script, snYpir did this part so I am not sure what he did exactly. The blood scripts now work when you reload a mission. RED Share this post Link to post Share on other sites
dinger 1 Posted September 20, 2003 okay to summarize savegame bugs that we now know about (feel free to add to them): After a reload: A) "killed" EHs are loaded as "Fired" (and similar things happen to others -- someone has a really nice writeup of all the problems) B) string variables longer than 4096 bytes are truncated. C) reserved variable time is set to 0 D) (the big one) in some cases (apparently with lots of scripting), the savegame file gets corrupted, causing a CTD on a reload or restart (even a MP restart). Ahh, if we could only isolate this one. Share this post Link to post Share on other sites