Difference between Published Script and Working Script

Posted By: Dooley

Difference between Published Script and Working Script - 03/24/15 08:38

Can anyone explain the basic differences between running your script through WED or SED, and running it after it's been published?

My game works fine when I run through WED, but after publishing it, it crashes with no explanation.

I increased the warning level to 6 in WED, and it starts without any warnings, but it still won't start when I try the published version.

In the publishing process, it says it's skipping only one file, which is acknex.wdf. According to the manual this is only used by the professional version ... I have commercial.

I am still using A7 engine, if that makes a difference.

Any help would be appreciated.
Posted By: EpsiloN

Re: Difference between Published Script and Working Script - 03/24/15 13:21

Its probably because of a missing file or two...
Manualy copy that file to the folder to see if it fixes the problem.

Also, I recently published in A6 and noticed that it requires a file from directx 9 (on Windows 8.1!). I always had that file, so I never knew it was needed for a fresh Win8.1. I had to manualy include it in the folder to fix the problem.
And, by the way, the game started without that file...
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 19:06

I noticed that the following files were not copied into the folder. I copied them from the GStudio7/acknex_plugins folder. When I included these files in my .cd folder, it mentions that they are being opened in the startup window.

ackwii.dll
ackport.dll
t7.dll

It still crashes, but I feel like this might be the right direction...
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 19:34

Also,
There are a lot of files in my game. Is there a fast way to figure out which, if any, files are missing?
Posted By: Superku

Re: Difference between Published Script and Working Script - 03/24/15 19:45

Have you tried copying the dlls and the exe into your development folder and start it from there (where all files should be present)?
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 20:17

Just tried it, it doesn't work.

I randomly removed some of the image files from my folder, just to see what would happen. It does not make it past the startup screen, and it says "Can't open >name of image file< ...

So I don't think it's to do with any missing files.

Also, I removed the d3dx9_30.dll file from my .cd folder, just to see what would happen, and it did not make any difference. It gets past the loading screen, then it tells me that "Level_001.exe has stopped working..."

Could it be directx related?

For the record, I have also tried including different versions of the directx files, including d3dx9_30,32,42 and 43. I saw this had solved someone else's issues on another thread.
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 20:50

Progress!
I got the game to load after removing an #include statement for a script that was not being used.

It seems to work fine now, but when I press "esc" to open the menu, the game crashes. Again, the menu works fine when I run through WED.

I noticed that two of the default scripts include an on_esc command. Could this be the issue?

One is in default.c (which I removed from my script) and the other is in avars.h, which I have no idea as to its function.
Posted By: EpsiloN

Re: Difference between Published Script and Working Script - 03/24/15 21:00

First, make sure you have no missing wait(1) instructions in every while loop you have... I've got this problem before, the engine didn't complain for some reason, some of the time...

After that, try starting the exe with the same defined parameters in SED or WED. I'm not sure the published version has any parameters saved as in WED's Run dialog.

And if nothing helps, you've got only one thing left. A painfully repeating task:
Start commenting one by one the functions you call from main() and other functions, and publish->run after each comment to see if it fixes the problem. This way you will find out which function crashes your game.
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 21:21

Thank you.
How would I define parameters in the .exe file? Here's what it's using in WED...

level_001.c -nx 200 -diag

This goes back to my original question. What is different in running through WED vs the published version? I'm hoping someone knows why they perform differently, because this would help narrow down the problem.

With that said, I'm guessing there's something wrong with my menu script, since this is where the crash happens. I'll look for missing wait instructions there...
Posted By: alibaba

Re: Difference between Published Script and Working Script - 03/24/15 21:58

I spend the last 5 days (about 2 hours a day) searching for that freaking bug. Mine also performed well in developement mode, but crashed when published. I don´t know why, but I had a lot of ent_create, ent_preload and ent_remove calls one after the other. Putting wait´s between the ent_create and preloads solved it somehow.

You´ll need a lot of patience! Best of luck!
Posted By: EpsiloN

Re: Difference between Published Script and Working Script - 03/24/15 22:41

I haven't used the defines for a long time, but try creating a shortcut of your exe on the Desktop -> right click and open Properties, in the Target box, after the end of the statement, if there are quotes add after them (after everything) the defines (-nx 200 -diag). It should work.

Also, for your menu script, make sure you're not using filenames directly! Add bmap definitions. And watch out for pointers.
It shouldn't be a problem, but you can mess panels easily.

alibaba,
As for entity creations, I always group ent_creates for a lot of entities in one call. I mean, I call ent_create 10 times with a counter, for example, and wait one frame. This makes sure the engine wont 'stall' for a second.
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 23:06

Adding the defines did not solve the problem. I will have another look at my script, to make sure all my bmaps are defined.

Thanks for your help!
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/24/15 23:44

Okay, more progress! By adding -diag to the published version, it created a log file. Both these issues pop up occasionally, but they are not the cause of the crash, at least, it doesn't crash when these are reported.

Material #DEFAULT undefined 1 textures
Material PORTAL_001 undefined 1 textures

These happen when I switch camera modes, and the texture gets defined through a script, so I don't think these are the problem, since switching camera modes seems to work fine in the published game.

I can play fine and load new levels, as well as travel back and forth between levels.

The crash occurs only when I try to access the game menu. However, if I've exited the first level, and then try to access the game menu, it does not crash, but it does not load the game menu either.
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/25/15 04:40

Okay, I'm doing some research. I don't know if this makes any difference, but I have been using "function" instead of "void" for all my programming. I guess I'm still a bit influenced by c-script. Could that have anything to do with it?
Posted By: Dooley

Re: Difference between Published Script and Working Script - 03/25/15 05:10

hmmmm.. I got it to work.

I saw this other thread: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=446023&page=2

It mentions that the guy just changed the name of a function, and it started working for him. I went ahead and tried it on mine, and it works now.

I'm happy, but confused. Why would it work through WED, and not when published? Seems like a possible bug.
Posted By: EpsiloN

Re: Difference between Published Script and Working Script - 03/25/15 06:14

In the good old days, when you develop and publish everything is the same. All files, .exe file.

Now I've noticed that it puts my .c files in a wrs file I guess. Maby there is a problem with long function names in those files when packed...

BTW, I don't remember what it was for, but somewhere in the manual I saw a 30 characters limit for filenames. I always use less...
Posted By: Dooley

Re: Difference between Published Script and Working Script - 04/21/15 03:06

Has this issue been reported as a bug? Seems like a bug if it works through WED, but not when published...
© 2024 lite-C Forums