Jump to content
DieselJC

Syntax seperation help

Recommended Posts

I think what I need help with is Syntax seperation...

 

so I have a script called define_mod.sqf  it adds in custom locations into a mission. I added in one location and that works fine,but when I go to add in another location and try seperating the two lines I always get an error or it doesnt work at all and no error.

 

What I have in the define_mod.sqf is this:

 

btc_custom_loc = [
[[11181.1,11456.1,0.00135803],"NameVillage","Sainte Eligous Island",300,300,true]
];
 

That works fine..but I want to add this location...

 

[[1142.08,11500.8,0.00144196],"NameCity","Olde Castle Island",300,300,true]
 

I tried seperating the 2 lines with a semi-colon a comma and just a space..each time i get an error or is doesnt read it all.

I then tried copying the line and just adding in the different location and names but then it reads just the last location and not both.

I downloaded type sqf editor and no matter what I tried it always told me it was missing a matching bracket..so i would add in a bracket and it would tell me i was missing a bracket on a deifferent line.

 

So my question is how do I seperate multiple lines so it reads them all.

 

Any help would be great..I'm off to take some excedrin...lol

 

Diesel

Share this post


Link to post
Share on other sites

@DieselJC Can you paste bin the full code and the error so we can get a better idea of what is going on?  The information your presenting doesn't give information to run off of.

Share this post


Link to post
Share on other sites
9 minutes ago, wyattwic said:

@DieselJC Can you paste bin the full code and the error so we can get a better idea of what is going on?  The information your presenting doesn't give information to run off of.

That is the whole code..it basically tells the mission the marker location on the map then the type of location and the name..then the mission decides how many baddies or ieds etc to spawn.

 

I did get it to work,I looked at a bunch of other scripts in other missions and found out how each one is seperated.

 

This is what I have and it works perfectly..just wan't sure how to seperate each line until i did some more digging in other stuff/missions.

 

btc_custom_loc = [
[[11181.1,11456.1,0.00135803],"NameVillage","Sainte Eligous Island",300,300,true],
[[1142.08,11500.8,0.00144196],"NameCity","Olde Castle Island",300,300,true],
[[11738.3,2057.82,0.00135803],"NameCity","Olde Chapel",300,300,true],
[[2899.93,1970.15,0.00143814],"NameCity","Sainte John Monastery",300,300,true],
[[3428.06,4417.5,0.00144958],"NameVillage","Le Mounte",300,300,true],
[[2360.62,6834.96,0.000904083],"NameCity","Camp Woode",300,300,true],
[[10874.5,8657.82,0.00170898],"NameVillage","Camp Elle",300,300,true],
[[8774.2,3882.18,0.00126648],"Hill","Mt. Elise",300,300,true]
];

 

First number is the location,then the location type then the name i made up for empty map area then spawn and radius distance and enemy presence true.

 

I appreciate the reply!

 

Diesel

Share this post


Link to post
Share on other sites
39 minutes ago, pierremgi said:

Personally, I use createLocation. Something like:

_location1 = createLocation ["nameLocal", [8200,3850,0], 400, 400];

....

Ahhh haven't tried that..thanks for the tip I appreciate it..always learning something new..lol

 

 

Diesel

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×