Author Topic: Stumbled upon an issue with commandToServer?[Solved]  (Read 892 times)

I've tried everything to solve this,
I want to call a server command via script, so I tried commandToServer("Help");
This crashes me anytime I put it into console and I can't figure out why.

Any help?
« Last Edit: September 25, 2012, 08:48:01 PM by ¥ola »

commandtoserver('help');

help is a /tagged string/

someone else can explain that better than i. just use apostrophies.

commandtoserver('help');

help is a /tagged string/

someone else can explain that better than i. just use apostrophies.
Yep.
Wow.
I feel extremely dumb, thank you Lugnut.

No need to explain further as I know this, I was too dumb to realize my mistake, thank you.

So, now I can't figure even this part out.
I'm so tired.

%testvariable = getWord(%msg,2);
commandToServer('%testvariable');

I cannot get this to work.
and yes %testvariable equals something.

Nevermind
addTaggedString();
« Last Edit: September 25, 2012, 08:47:56 PM by ¥ola »

it works like this:

server side
function serverCmdMyMessage(%client, %arg1)
  {
   code goes here
  }

client side
%testvariable = <some value>
commandToServer('MyMessage', %testvariable);

it works like this:

server side
function serverCmdMyMessage(%client, %arg1)
  {
   code goes here
  }

client side
%testvariable = <some value>
commandToServer('MyMessage', %testvariable);
I know how to create functions, lol.

I was wondering how to convert a regular global variable into a tagged string which uses addTaggedString()

%bacl = "asdf";
commandtoserver(addtaggedstring(%bacl),"blahblahblahblkahl");


Idk whether this also works
%blah = "kdksf";
%bleh = addtaggedstring(%blah);
commandtoserver(%bleh,"blahblih");

%bacl = "asdf";
commandtoserver(addtaggedstring(%bacl),"blahblahblahblkahl");


Idk whether this also works
%blah = "kdksf";
%bleh = addtaggedstring(%blah);
commandtoserver(%bleh,"blahblih");

Why wouldn't the latter work?