Jump to content
  • 0
astralprojection

How to enclose qoutation to string variable

Question

-<tab>script<tab>test#dumb<tab>HIDDEN_NPC,1{
  end;

OnWarp:
  input .@playername$;
  atcommand "#warp "+.@playername$+" "+.arena_map$+" 22 50";
 end;

OnInit:
 bindatcmd("warpthisdumbplayer","test::OnWarp",0,99);
 .arena_map$ = "guild_vs2";
 end;
}

I was hoping to do ( #warp "My Name Is Bond" guild_vs2 22 50 )

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

if you want double quotes to be part of a string you have to escape them

"foo \"bar\" baz"

Share this post


Link to post
Share on other sites
  • 0

better use way how suggested @Asheraf, because it allow use good translation,

but if you want strings concatenations, use this code:

atcommand "#warp \"" + .@playername$ + "\" " + .arena_map$ + " 22 50";

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.