Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / v1.20 Fpi Command 'quicksavegame' causes array error in built exe?

Author
Message
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 22nd Feb 2015 14:25 Edited at: 22nd Feb 2015 15:02
Greetings, I have a question for you guys, Ive done a lot of searching even encountering a similar problem that another user had which Blackfox managed to help fix but the fix sadly isnt working for me.

My question then is thus, are any other 1.20 or AirMod users getting an array out of bounds error in built games when triggering the quicksavegame command in an fpi script?

Error 118, array out of bounds line 46648, the errors longer than that but the code and line are the important parts.

After some extensive testing (building the exe some 17 times in various iterations) I managed to narrow it down to a script, eventually a line and finally to that specific command.

I removed the command from all Fpi's in the exe and the game works fine, better than i expected even!

But without a way to reload the level from scratch upon a failure condition I need to get the quick save command working!

I have a fail cond in my game where if a hostage is shot, fail. But the player simply respawns at the spawn point but level remains the same as the point at which the player died, it needs to reload so I ask if theres a way to do this or if anyone knows how to get past this array subscript error.

One command is killing my game.

**Edit**

Little testing seems to suggests its worse than I first thought, out of curiosity I loaded up the last working test exe and instead of starting a new game, I hit load game, boom same error, 118 line 46648, seems like the entire save/load function in the exe isnt working correctly.... Ideas?

I know on my previous project it worked fine, the built Alpha saved, loaded no problems.

Possibly related now that I think of it, on the build game menu, I cant seem to edit any of the files any more without getting an error, again an array/subscript error, 118 line 58694 this time, Im beginning to think there may be something that has recently gone seriously wrong inside my fpsc somewhere.

Any help would be greatly appreciated, I really made some unexpectedly big progress to the point where Ive got something that worked perfectly in the test game environment, but seems to be catastrophically failing at the last hurdle!

**EDIT EDIT**

Just to test if my FPSC was at fault i renamed the existing fpsc folder to something else, installed fpsc all over again, and just built a quick test exe in that folder, built the game, and no error.

So In asking for help and testing it in the mean time I may have found a solution, but that doesnt help explain why it happened in the first place, Im not to well versted with array/subscript tables or whatever, but if someone knows what those lines in the error are for and can give me some sort of explanation for whats happening and how I may be able to rebuild the array if a fail like this happens again?

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 23rd Feb 2015 01:33
Sinister Spoon
o.k. just read thru your post. You just need to get the "quicksave"
command to work, correct? Remember that the "quicksavegame"...
(This saves the game to the FIRST saved game slot WITHOUT showing
the save game dialog box) But "savegame" allows you to choose
which slot to save it to.
I have a few builds to test it on and I'll let you know.
best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 23rd Feb 2015 02:24
Yeah just the quick save function, the odd thing is I have two working fpsc builds, currently updated to the same version, to test on identical copy without having to re install each time.

On the main build I use to work on, the function fails in a built game and just produces the error, on the back up install however, it works fine on the built game.

Leads me to believe somethings gone awry in my main install of fpsc, its not a huge issue as I can just build it through the back up install (they share asset folders so its just a case of swapping the names of the folders around.

Just seems that even though the two installs should be relatively identical ( save for dbo and dbu, image block files, anything the editor compiles while your testing and building the levels within each installs seperate archive) theres evidently some discrepency between the two.

Thanks for looking into though, let me know what you find.

Good news is though its not halting progress on my game anylonger and I just finished the AI code for a pack of screaming airline dinners the player must hunt down which run randomly around the cabin

On a related note to that, I discovered that if they hit the player while moving randomly the around the player sometimes gets attached to them for a time and dragged around, gives me an idea for a section where the player must avoid a collection of ravenous photocopiers determined to grab you and drag you off to the nearest office supply cupboard!

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 23rd Feb 2015 04:00
Sinister Spoon
Just ran & built a quick level with both "quicksavegame" and "savegame" actions. They both work perfectly for me.
Used a trigger for both. "quciksavegame" saved to first slot
everytime.


"savegame" menu for slot to pick came up.

best

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 23rd Feb 2015 12:52
Yep same problem with that code, works in the back up build, doesnt work if built from the main fpsc install.

Its so weird, and I dont think my jabbering nature helps explain whats going wrong.

Basically in my c:\programs\thegamecreators folder I have two install folders:

One named

Fps Creator (the main install)

and a second install,

Fpsc Creator1 (back up install with the 1 in the folder name to make sure fpsc is reading from the correct install)

So in the main install of fpsc i build the game and I get crashed back to desktop when I use the save commands (including the re done ones provided by you (mako) in the built exe.

If I rename that folder to fps creator 1, and take the 1 off the folder name from the back up install so fpsc runs off of that install temporarily, and build the game then all save functions work perfectlyin the built exe including the code snippets.

My theory is that somewhere in the main install theres a corrupted file or array table, and as the master copy is corrupt when a game gets built through that install the corrupt file gets built into the game and causes a crash everytime the game runs any of the save commands.

If anyone who is familiar with the array table values could explain what line 46648 controls I think that would go a long way to discovering which file is corrupted.

In the mean time I can always build the game from the back up install. I just find the whole thing strange.

smoke em if you got em
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 23rd Feb 2015 15:47
Sinister Spoon
Try this method to expose what line 46648/problem might be. It
helped me track down a audio problem. In your build's "setup.ini"
place these lines in the "gamedebug" section..

Run your build that crashes, it will run a "loadreport" and when
it exists a "loadreport.txt" will be under "files" folder.
See if it gives you a clue where it crashed.
best luck

My games never have bugs. They just develop random features..
Lots and lots of random features...
Sinister Spoon
16
Years of Service
User Offline
Joined: 9th Sep 2008
Location:
Posted: 23rd Feb 2015 15:54
Thanks!

That sounds like just the ticket! I'll give that a whirl go after I finish coding the section where the player has to chase down a bunch of 'free range' airline dinners which scuttle tweeting around the cabin

smoke em if you got em

Login to post a reply

Server time is: 2024-11-21 12:48:12
Your offset time is: 2024-11-21 12:48:12