Jump to content
Sign in to follow this  
zovirl

quotes inside quotes?

Recommended Posts

Ok, how do you put quotes inside a string?  As an example, I want a hint that says something like this:

Run to the "camp" quickly!

(What I actually want is to have a hint statement inside a foreach statement, which would require nested quotes.)

(Edited by zovirl at 10:30 pm on Nov. 20, 2001)

Share this post


Link to post
Share on other sites

I have one question too...

What if I want to exec

[_x] exec "blabla.sqs"

for every unit in array with foreach command?

"[_x] exec "blabla.sqs"" foreach ArrayOfunits <-? :-)

Share this post


Link to post
Share on other sites

About [_x] exec "blabla.sqs":

You could try this:

s="blabla.sqs"; "[_x] exec s" foreach ArrayOfunits

Don't know how to get quotes inside strings, though.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Quote: from Gaswell on 3:40 pm on Nov. 21, 2001

About [_x] exec "blabla.sqs":

You could try this:

s="blabla.sqs"; "[_x] exec s" foreach ArrayOfunits

Don't know how to get quotes inside strings, though.<span id='postcolor'>

I tried this:

_Array = + list tEast

_Script = "print.sqs"

[player] exec _Script

"[_x] exec _Script" foreach _Array

"_x setdammage 1" foreach _Array

exit

The line where it prints out the player works. The foreach with the print doesn't work. The setdammage works. So what I am thinking is that inside it is still choking on the nested quotes. Anyone from BIS care to comment on this? Is there any way to do this?

Share this post


Link to post
Share on other sites

I saw that in sqm file:

init="this addweaponcargo [""M21"",5]; this addmagazinecargo [""M21"",25]";

So maybe we can use the same syntax in our scripts?

Share this post


Link to post
Share on other sites

I saw that in sqm file:

init="this addweaponcargo [""M21"",5]; this addmagazinecargo [""M21"",25]";

So maybe we can use the same syntax in our scripts?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Quote: from HappyG on 10:10 pm on Nov. 22, 2001

I saw that in sqm file:

init="this addweaponcargo [""M21"",5]; this addmagazinecargo [""M21"",25]";

So maybe we can use the same syntax in our scripts?

<span id='postcolor'>

Doesn't seem to work elsewhere. That is odd...isn't it the same reader? At least for working through arrays of objects, you can write your own loop using the count statement. Still, it seems like there should be a way to nest quotes...

Still wish BIS would just answer this and save us a bunch of time (of course, the problem is that the "answer this" part of that really means "answer this and a millon other questions" and they are already busy...)

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  

×