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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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