Jump to content
pliskin124

Simple problem with syntax

Recommended Posts

Greetings,

 

I am trying to use this code to create an add action on a vehicle, (which is done correctly), and then display the text, however rather than displaying it as a hint I want it to display as TitleText so it is more visible in the center of the screen, however I feel I have the syntax incorrect. I'm not sure what exactly it should be for the ] and }

 

Any help would be much appreciated, thanks.

 

greet= RBVeh addAction ["Greeting", {titleText "Hello. How are you today sir? Im an Afghani Citizen." }];

Share this post


Link to post
Share on other sites

I've already looked at the wiki. I know how to do title text by itself, I need it in conjunction with the addaction and can't figure out the syntax because the wiki is vague. A direct answer would be appreciated. Thanks.

Share this post


Link to post
Share on other sites
2 hours ago, pliskin124 said:

I know how to do title text by itself, I need it in conjunction with the addaction and can't figure out the syntax because the wiki is vague.

 

I wouldn't say that. The wiki isn't vague, it shows you exactly how to write it.

You didn't add an effect type or a duration, and you didn't wrap in it brackets.

greet = RBVeh addAction ["Greeting", {titleText ["Hello. How are you today sir? Im an Afghani Citizen.", "PLAIN", 0.5]}];

 

Share this post


Link to post
Share on other sites
8 hours ago, pliskin124 said:

I've already looked at the wiki. I know how to do title text by itself, I need it in conjunction with the addaction and can't figure out the syntax because the wiki is vague. A direct answer would be appreciated. Thanks.

 

How is wiki vague? Would you mind to elaborate on it, maybe it can be improved if it so confusing? It even gives you copy paste example you just need to copy and paste between { and }.

Share this post


Link to post
Share on other sites
17 hours ago, killzone_kid said:

 

How is wiki vague? Would you mind to elaborate on it, maybe it can be improved if it so confusing? It even gives you copy paste example you just need to copy and paste between { and }.

 

On a simple title text it's fine, but on a more complicated syntax it doesn't provide any examples or answers on how the ]; should be used in conjunction. If you've been coding for years you probably don't think its vague, but to someone learning, trying to do anything more than the simple copy paste the command is difficult to interpret.

Share this post


Link to post
Share on other sites
4 hours ago, pliskin124 said:

 

On a simple title text it's fine, but on a more complicated syntax it doesn't provide any examples or answers on how the ]; should be used in conjunction. If you've been coding for years you probably don't think its vague, but to someone learning, trying to do anything more than the simple copy paste the command is difficult to interpret.

 

I am confused. Could you please give example of simple title text and one with ];

Share this post


Link to post
Share on other sites

Like kk said, give an example. The syntax doesn't change just because you're using it inside an addAction command.

 

Cheers

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

×