Author Topic: Help with script (networking)  (Read 1216 times)

0 Members and 1 Guest are viewing this topic.

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Help with script (networking)
« on: January 15, 2013, 05:01:21 pm »
I have 2 script. One of them working properly the other only works on me.

Here is the working one (the important part of it!!!) It works on the selected person (AJ cheat menu) It's working properly but not every server

Code: [Select]
case "Add lsd": // Add lsd
{
_animClass ="['lsd',1] call INV_AddInventoryItem;"
};

but on someserver I have to use this:

Code: [Select]
_animClass =  ["lsd",1] call INV_AddInventoryitem;
It works great, but only on me and not on the selected person
the problem is: IF u put it in quotation It doesnt work at all.

I tried this: "["lsd",1] call INV_AddInventoryitem;" but  then doesn't work at all

Where do I have to put the ""   in the second variation?
« Last Edit: January 15, 2013, 05:26:02 pm by tranks »

XJ

  • Online Villain
  • ***
  • Posts: 246
  • Find what you love and let it kill you.
    • View Profile
Re: Help with script (networking)
« Reply #1 on: January 17, 2013, 10:50:52 am »
Quotation = " blah "
Quotation in a quotation = "" blah ""
Quotation in a quotation in a quotation =  """" blah """"

.. and so on. But I don't think that's what you wanted to know, having kind of a hard time trying to understand your problem.  :icon_o_o

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Re: Help with script (networking)
« Reply #2 on: January 17, 2013, 12:47:26 pm »
_animClass =['lsd',1] call INV_AddInventoryItem (standalone) <---- works perfect .
_animClass ="['lsd',1] call INV_AddInventoryItem;" <-----and in my script too.

_animClass =  ["lsd",1] call INV_AddInventoryitem       <-----it works as standalone script but dont know how to implement this into my whole script._animClass =  "["lsd",1]call INV_AddInventoryitem;" Its probably because I miss to put  e.x:[ ], ' " or something (I want to use this because the first one is prevented to use on some server.. Sorry for my english , look at the codes. Here you can see the whole script

difference highlighted with red. I want to use the second option in my menu But I can only use the first code.

_animClass = "";
_animClass =  "["lsd",1]call INV_AddInventoryitem;" <----- where is the mistake in this script??

Code: [Select]
_animName = _this select 1;

_animPerson = _this select 0;

_animClass = "";
if (_animPerson == "") exitwith { Hint "Some how there was an error check your scripts : or You need to select a name in the player list , if you wish to activate it on all players then click all players or select an indevidiual name to perform that action onto. then click EXECUTE.";};

if (_animPerson == "ALL PLAYERS") then {_animPerson = "";};



// -- -- ------------------------------//
switch (_animName) do
{
case "Add LSD": // Add LSD
{
_animClass ="['lsd',1] call INV_AddInventoryItem;"
};




};
//hint format ["%1 , %2 , %3",_animPerson,_animName,_animClass];
nil = [_animPerson, 11 ,_animClass] execVM "AJ\scripts\666.sqf";

this one works great _animClass ="['lsd',1] call INV_AddInventoryItem;" but not with the other
« Last Edit: January 17, 2013, 01:41:48 pm by tranks »

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Re: Help with script (networking)
« Reply #3 on: January 17, 2013, 02:01:19 pm »
Quotation = " blah "
Quotation in a quotation = "" blah ""
Quotation in a quotation in a quotation =  """" blah """"

.. and so on. But I don't think that's what you wanted to know, having kind of a hard time trying to understand your problem.  :icon_o_o

Long story short: _animClass =  "["lsd",1]call INV_AddInventoryitem;" <----- where is the mistake in this script??

XJ

  • Online Villain
  • ***
  • Posts: 246
  • Find what you love and let it kill you.
    • View Profile
Re: Help with script (networking)
« Reply #4 on: January 17, 2013, 02:55:05 pm »
Ah okay, then it was that after all.

This: _animClass =  "["lsd",1]call INV_AddInventoryitem;"

.. should be ..

this: _animClass =  "[""lsd"",1]call INV_AddInventoryitem;"

tranks

  • Intentional Cheater
  • **
  • Posts: 32
    • View Profile
Re: Help with script (networking)
« Reply #5 on: January 25, 2013, 01:15:54 am »
thanks :icon_magician