Jump to content
Sign in to follow this  
Zorasht

Description, init and param problems

Recommended Posts

hi, I'm trying to add two options for choosing in MP before the mission start.

I have added this to my description file:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

titleparam1 = "Respawn Type: ";

valuesparam1[] = {0, 1, 2, 3, 4, 5};

defvalueparam1 = 1;

textsparam1[] = {No respawn, Spectating, Instant, Base, Group, Side};

titleParam2 = "Weather/Time:";

valuesParam2[] = {1,2,3,4,5,6,7,8,9,10,11,12};

defValueParam2 = 2;

textsParam2[] = {Clear/Dawn, Clear/Day, Clear/Dusk, Clear/Night, Cloudy/Dawn, Cloudy/Day, Cloudy/Dusk, Cloudy/Night, Storm/Dawn, Storm/Day, Storm/Dusk, Storm/Night};

Some lines below, in the same file I have added this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

respawn = param1;

respawndelay = 3;

So the first parameter should be ok. I have included the keygets spectating script in my init.

The init file looks like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// Initialize spectating script when player joins as seagull

// Set the following to limit visible sides:

//  KEGsShownSides = [west, east, resistance, civilian];

[] execVM "spect\specta_init.sqf";

//for daytime

; PARAMETERS

?(param2 == 1):goto "pa"

?(param2 == 2):goto "pb"

?(param2 == 3):goto "pc"

?(param2 == 4):goto "pd"

?(param2 == 5):goto "pe"

?(param2 == 6):goto "pf"

?(param2 == 7):goto "pg"

?(param2 == 8):goto "ph"

?(param2 == 9):goto "pi"

?(param2 == 10):goto "pj"

?(param2 == 11):goto "pk"

?(param2 == 12):goto "pl"

#pa

0 setOvercast 0

setdate [2007,8, 22, 04, 30]

goto "Param2_END"

#pb

0 setOvercast 0

setdate [2007,8, 22, 12, 00]

goto "Param2_END"

#pc

0 setOvercast 0

setdate [2007,8, 22, 19, 30]

goto "Param2_END"

#pd

0 setOvercast 0

setdate [2007,8, 22, 01, 00]

goto "Param2_END"

#pe

0 setOvercast 0.5

setdate [2007,8, 22, 04, 30]

goto "Param2_END"

#pf

0 setOvercast 0.5

setdate [2007,8, 22, 12, 00]

goto "Param2_END"

#pg

0 setOvercast 0.5

setdate [2007,8, 22, 19, 30]

goto "Param2_END"

#ph

0 setOvercast 0.5

setdate [2007,8, 22, 01, 00]

goto "Param2_END"

#pi

0 setOvercast 1

setdate [2007,8, 22, 04, 30]

goto "Param2_END"

#pj

0 setOvercast 1

setdate [2007,8, 22, 12, 00]

goto "Param2_END"

#pk

0 setOvercast 1

setdate [2007,8, 22, 19, 30]

goto "Param2_END"

#pl

0 setOvercast 1

setdate [2007,8, 22, 01, 00]

goto "Param2_END"

#Param2_END

if (true) exitWith {};

And I have problem with that, with the second parameter. it looks OK, i just copied from other mission I had downloaded, so it should be ok, but it keeps coming up this error:

armaDesInitError.jpg

This error comes with the second parameter, because I added the first parameter later(when I thought I had fix the second one, but I was wrong), so it was happening with the second paramenter alone.

I also like to know if the first parameter looks ok, I mean, if that can be done inside the description file.

Share this post


Link to post
Share on other sites

Your init file is sqs format, not sqf.

Rename to init.sqs, or convert to proper sqf format.

Share this post


Link to post
Share on other sites
Your init file is sqs format, not sqf.

Rename to init.sqs,  or convert to proper sqf format.

Thanks. I thought I had it as sqs  banghead.gif  banghead.gif

But i just change the code to sqf, that i can understand better.

That is solved.

But the first part is not working, it gives me no errors, but it doesn't work. My doubt now is if what I've done is possible or not, since I think I did it too easy, and I haven't seen any missions doing the same.

Is there any way of choosing the respawn method at missions start?

Share this post


Link to post
Share on other sites

Please post the sqf scripts at pastebin.com and reply the link in this thread, so we can actually look on the actual code and stuff biggrin_o.gif

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
Sign in to follow this  

×