Home   Help Search Login Register  

Author Topic: Single Player save=losing scripts bug.  (Read 1496 times)

0 Members and 1 Guest are viewing this topic.

M_S_Holder

  • Guest
Single Player save=losing scripts bug.
« on: 01 Jan 2004, 00:28:56 »
Lately wheniver I save a mission in the editor to become a single player game, I lose some scripts.

I've even tried stuff PBO and make PBO, but I still lose some scripts when I try to play the game in singleplayer.

Is anyone familiar w/this bug?

m21man

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #1 on: 01 Jan 2004, 00:58:22 »
I always just manually compressed the mission folder with MakePBO.

deaddog

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #2 on: 01 Jan 2004, 04:51:57 »
I don't think this is a bug.  If you are having trouble with three different methods, then the problem is probably with you (no offense).  I have never had a problem when exporting to single player.  All files always show up in the resulting pbo file.  Are you sure all files are in the correct folder to begin with?  Maybe you can list the filenames for us and exactly where they are before you export.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Single Player save=losing scripts bug.
« Reply #3 on: 01 Jan 2004, 13:56:25 »
When resaving a mission in the editor, if you change the filename and then save, only the mission.sqm will be copied into the new folder

Could this be your problem, or was you keeping the original filename
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

M_S_Holder

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #4 on: 02 Jan 2004, 16:30:25 »
No this is definately some kind of bug.  The mission scripts work fine in the editor, and when I export it to single player (without changing the name) SOME scripts work and Some scripts are not found.  I could understand if all or none showed up, but some?

Then when I unpbo the mission, the scripts are all in the right place.  

Some of my scripts are in folders inside of folders inside of folders, and these are the ones that usually are not found.  I think this may be my problem.

I was just wondering if anyone else has seen this.


deaddog

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #5 on: 02 Jan 2004, 16:59:44 »
Ok, I see what's going on here.

You are calling your scripts wrong.  If a script is in a subfolder then you have to include the subfolder name.

Example:

I have a folder called "functions" and a script called "getdirection.sqs"

[whatever] exec "functions\getdirection.sqs"

is the proper what to call this script.  Do not put a \ in front of the subfolder name.  You only do that if the script is inside a different pbo file (such as an addon).

If this is not your problem then you're going to have to let us see your mission.  I'm not sure if you can attach anything right now so you can always email it to me at deaddog@earthlink.net

« Last Edit: 02 Jan 2004, 17:07:03 by deaddog »

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Single Player save=losing scripts bug.
« Reply #6 on: 02 Jan 2004, 17:46:43 »
Could be any number of things.

Savegame bugs I know about:

A) Loading after a savegame sets global variable TIME to zero.
B) strings in .fps files are truncated after 4096 bytes.  If you are loadfiling a function to a string, and the function is longer than 4k, reload will corrupt the function.
C) really complicated game states corrupt the .fps file altogether.
Dinger/Cfit

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Single Player save=losing scripts bug.
« Reply #7 on: 02 Jan 2004, 22:07:29 »
Quote
[whatever] exec "functions\getdirection.sqs"

Is it possible that the type of slash matters? I know you can use either the forward slash / or the backslash \ for folders, and both will work in the mission editor. Perhaps only one type of slash works after the mission is pbo'd? I think I remember reading that somewhere.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

M_S_Holder

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #8 on: 03 Jan 2004, 02:00:33 »
I'll definately check out that foward/backward slash thing.


I'm calling the scripts correctly.  All scripts function correctly in the editor.  After being PBO'd sometimes some of them don't show up.

I fixed a major problem by simply combining tons of little 2-line scripts into a more coherent script one directory up.

But all the scripts DID work in the editor, but sometimes a few were missing in the SP mode.

I guess it is possible that my scripts are sometimes a bit verbose and their placement a bit more complex than necessary--I also have a ton of short scripts, sometimes containing no more than two lines.

But I've been modifying the game long enough to know that this is definately a bug.  Perhaps because nobody else has my spaghetti-syle of scripting it hasn't really been a problem for anyone else.

« Last Edit: 03 Jan 2004, 02:03:15 by M_S_Holder »

deaddog

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #9 on: 03 Jan 2004, 02:56:02 »
Quote
I fixed a major problem by simply combining tons of little 2-line scripts into a more coherent script one directory up.

What exactly do you mean by one directory up?  Do you really mean one directory down?  Give us the complete path to the mission (in the editor) and to one of the scripts that doesn't work in SP mode.  And also, show an example of how you are calling the scripts (the ones that don't work).

And how do you know they are missing?  Do you get an error message or does the script just not work?  You said earlier that when you unpbo the file, all the scripts are there. If that is the case, then they are in the pbo file and are not missing.

« Last Edit: 03 Jan 2004, 02:59:04 by deaddog »

M_S_Holder

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #10 on: 03 Jan 2004, 17:34:00 »
Here is a relatively simple script:

It is activated with Radio Trigger Charlie, set repeatedly.
Activation: [] exec "Build/Garage1/Start.sqs"

The Start.sqs is in the folder named "Gararge1," which is in a folder named "Build."  It goes:

3 setRadioMsg "null"

Worker sidechat "Select Motor vehicle for construction."

Garage1Motorbikeaction = player addaction ["Motorbike (30 mins)","Build/Garage1/MakeMotorbike.sqs"]
Garage1UAZaction = player addaction ["UAZ (45 mins)","Build/Garage1/MakeUAZ.sqs"]
Garage1URALaction = player addaction ["URAL (2 hrs)","Build/Garage1/MakeURAL.sqs"]
Garage1ReammoURALaction = player addaction ["Reammo URAL (3 hrs)","Build/Garage1/MakeReammoURAL.sqs"]
Garage1RefuelURALaction = player addaction ["Refuel URAL (3 hrs)","Build/Garage1/MakeRefuelURAL.sqs"]
Garage1RepairURALaction = player addaction ["Repair URAL (4 hrs)","Build/Garage1/MakeRepairURAL.sqs"]
Garage1closeaction = player addaction ["Make nothing yet","Build/Garage1/Close.sqs"]
exit


All of the Makemotorbike.sqs and Make(whatever).sqs scripts are pretty much the same.  For example, here is MakeUAZ.sqs:

;Make UAZ
player removeaction Garage1Motorbikeaction
player removeaction Garage1UAZaction
player removeaction Garage1Uralaction
player removeaction Garage1ReammoUralaction
player removeaction Garage1RefuelUralaction
player removeaction Garage1RepairUralaction
player removeaction Garage1Closeaction

worker sidechat "We are starting work right way on the UAZ!"

~2700

worker sidechat "We have completed the UAZ!"

"UAZ" createVehicle (getMarkerPos "garage1")

3 setRadioMsg "Motorpool"

exit

In the editor, everything worked fine, but sometimes in SP I get an error that the Start.sqs is not found.

I'm almost sure the / and \ is the issue.
« Last Edit: 03 Jan 2004, 17:36:22 by M_S_Holder »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Single Player save=losing scripts bug.
« Reply #11 on: 03 Jan 2004, 17:44:47 »
Have you tried both:

Activation: [] exec "Build/Garage1/Start.sqs"

and

Activation: [] exec "Build\Garage1\Start.sqs"

If anything, I think the second one would be correct.


Planck
I know a little about a lot, and a lot about a little.

M_S_Holder

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #12 on: 03 Jan 2004, 17:58:36 »
I'll find out definately this evening, and close this this problem down, hopefully.

deaddog

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #13 on: 03 Jan 2004, 18:19:34 »
I just tried it with / and \.

Didn't work with / but did with \.


M_S_Holder

  • Guest
Re:Single Player save=losing scripts bug.
« Reply #14 on: 03 Jan 2004, 18:26:07 »
Great. Thanks. Solved.