Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location: Middlesbrough!
Occupation: Council
Age: 27
In-game name: Zarniwoop

 
#1 Posted at 2017-01-12 11:32        
     
First of all I'd like to say, this is my first time posting here (I think), been a member for a while.
If I've put this in the wrong place I can only apologise.
I am very sorry for exposing you educated and experienced people to my horrendous attempts at learning to script for Arma, but I am learning (even if a little slowly).

So could somebody take a look at this code for me and tell me what I'm missing?
I think I've been staring at it for too long and I cannot see why my briefing and objectives are not present in my mission.
I've made way more complex missions than this one before and they worked, perhaps a bit ropey in places, but they had objectives and briefings.. has been about a year since last mission editing and all my previous attempts were severely modded affairs and as such I can't really recompile the files in order to load the mission, I have no idea what mods were used.

I am using one addon mod atm, but it is not used in this mission. It's an L119a1 pack mod.

Here is my briefing.sqf

player creatDiaryRecord ["Diary", ["August 2nd, 2009", "We have been redeployed, attached to a special ops unit. <br/>I've been given command of an infantry section for the duration of my stay in special ops. <br/>We have been tasked with destroying a fuel depot and a radar site. <br/>Additionally we are to cause as much damage to Takistani military infrastructure as possible on the way to our main objectives, if and when the opportunity presents itself."]];

task1 = player createSimpleTask ["Reach overwatch"];
task1 setSimpleTaskDescription ["Lead your team to the overwatch <marker name='Overwatch'>position</marker>.", "Reach overwatch", "Overwatch"];
task1 setSimpleTaskDestination (getMarkerPos "Overwatch");
task1 setTaskState "CREATED";

player setCurrentTask task1;

task2 = player createSimpleTask ["Destroy depot"];
task2 setSimpleTaskDescription ["Destroy the fuel depot located <marker name='Destroy Depot'>here</marker>.", "Destroy depot", "Destroy"];
task2 setSimpleTaskDestination (getMarkerPos "Destroy Depot");
task2 setTaskState "CREATED";

task3 = player createSimpleTask ["Destroy radar"];
task3 setSimpleTaskDescription ["Destroy the radar installation at this <marker name='Destroy Radar'>site</marker>.", "Destroy radar", "Destroy"];
task3 setSimpleTaskDestination (getMarkerPos "Destroy Radar");
task3 setTaskState "CREATED";

task4 = player createSimpleTask ["Extract"];
task4 setSimpleTaskDescription ["Move to the extraction <marker name='Extract'>point</marker>.", "Extract", "Extract"];
task4 setSimpleTaskDestination (getMarkerPos "Extract");
task4 setTaskState "CREATED";


=========================
I've been trying to execute this .sqf from init.sqf located in the missions folder. I believe this is correct, I followed a guide found on Armaholic, and I know I used the same guide last time I was mission building.

The init.sqf line is:
Nul = this execVM "briefing.sqf";

I tried first:
execVM "briefing.sqf";

When that didn't work I checked the line I was using for my loadout scripts and added the Nul = this line, but that didn't work either.

I have all the objectives placed and triggered up, markers are placed and named correctly (case sensitively just in case).

I am running the Ambient Combat Manager and the SecOps Manager as well, I may have done this in previous missions made as well but I'm not certain, certainly the SecOps manager was used in my previous missions, but possibly not the ACM.

Here is an example of the setup trigger for completing task1:

Task1 setTaskState "SUCCEEDED"; player setCurrentTask task2; player setCurrentTask Task2;

The following objectives are pretty much in the same vein:

Task2 setTaskState "SUCCEEDED"; player setCurrentTask task3;

and so on, the Task1 and Task4 objectives are trigger areas, synced to the group commander, so they should complete when me as the player is within 25 metres.

The objectives are not listed in the "J" screen, neither is the diary entry.
In the past I have encountered problems before writing the briefing.sqf, but I've also had a fair amount of success.

I'm hoping there's something glaringly obvious.

Thank you for anything you can bring to this, and cheers for your time.

Zarniwoop: Lead-Editor at Megadodo Publications, Ursa Minor.

Author Message

W0lle  

call me evil


Posts: 1944
Rank:


Country: de
Location:
Occupation: CWR² Project Lead
Age: 101
In-game name:

 
#2 Posted at 2017-01-12 12:12        
     
Your problem is line 1 in the briefing.sqf : player creatDiaryRecord must be createDiaryRecord.

Everything else is just fine. And executing the script with execVM "briefing.sqf"; does the job as well.


Advertisement


Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location: Middlesbrough!
Occupation: Council
Age: 27
In-game name: Zarniwoop

 
#3 Posted at 2017-01-12 13:58        
     
Orrr man I'm laughing now, thanks so much!
I was sitting staring at the code losing my mind, I needed a fresh set of eyes, thanks sooooo much!
My girlfriend is laughing at my ineptitude. =p

Zarniwoop: Lead-Editor at Megadodo Publications, Ursa Minor.

Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#4 Posted at 2017-01-12 18:17        
     
May I suggest to read the last report file .rpt in your hidden folder ...\users\<user name>\appData\loacal\Arma 3 ?
This kind of error is reported.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message

W0lle  

call me evil


Posts: 1944
Rank:


Country: de
Location:
Occupation: CWR² Project Lead
Age: 101
In-game name:

 
#5 Posted at 2017-01-12 19:10        
     
No worries arjay, I too was looking for the problem for quite some time. The famous one byte errors which happen to each of us, still after many years. :-)

@Pierre
This is about A2 (again). And the rpt is useless because it was complaining about a missing semicolon in line 1.


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#6 Posted at 2017-01-12 19:19        
     
Ah ok. Thank you to correct for reading arma2. The "missing semi-colon in line 1" report points at least at the faulty line.
(here creatDiaryRecord was taken for a variable name instead of a command). Not evident. So let me add, a script highlighter is very useful. mine is sublime text2, embedded in poseidon, but there are some good other ones for sqf.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location: Middlesbrough!
Occupation: Council
Age: 27
In-game name: Zarniwoop

 
#7 Posted at 2017-01-14 09:31        
     
I'll have to have a google and check out Sublime, I've been using Notepad++ and been loving it, but if it could have somehow pointed out to me something was amiss that'd have been cracking.

I had no idea there was any such file, this .rpt sounds like something I should get to know.

Missions works 100% now, apart from the odd bit of "stunt" flying from local A10 airmen, it's all been running very smoothly.

Thanks a lot dudes,

Zarniwoop: Lead-Editor at Megadodo Publications, Ursa Minor.