red_ned

Adding 2 strings together

3 posts in this topic

If you want to add 2 strings together

say

_ned_VehicleItems1 = [["Exile_Item_ExtensionCord",1,1], ["Exile_Item_DuctTape",1,3]];
_ned_VehicleItems2 = [["Exile_Item_LightBulb",1,2],["Exile_Item_MetalBoard",1,3]];


does this work?
_ned_VehicleItems = [["_ned_VehicleItems1"] + ["_ned_VehicleItems2"]];

or

_ned_VehicleItems = [[_ned_VehicleItems1] + [_ned_VehicleItems2]];

or
_ned_VehicleItems = [_ned_VehicleItems1" + _ned_VehicleItems2];

to give
_ned_VehicleItems = [["Exile_Item_ExtensionCord",1,1], ["Exile_Item_DuctTape",1,3], ["Exile_Item_LightBulb",1,2],["Exile_Item_MetalBoard",1,3]];

advice please?

Sorry don't have dev server atm to test it all out on

Share this post


Link to post
Share on other sites

Hello Red_Ned,

#1 - You do not need a server to add strings.  You can do it via SP

#2 - Unless I am wrong, "Exile_Item_ExtensionCord",1,1 is not a string

#3 - To add strings in ARMA:  _Combined = _string1 + _string2  That is all there is to that!

 

Example:

  _example = "This " + "is " + "a test";

hint _example;

 

This would show a hint message containing:  "This is a test"

 

So you could say:   _ned_VehicleItems3 = _ned_VehicleItems1 + _ned_VehicleItems2;

 

:)

 

  • Like 1

Share this post


Link to post
Share on other sites

cheers, 9 months off and no test server helping me debug and information leaked out of my brain, just looking at a nice way to accumulate items into a mission by adding more per difficulty so this is a nice easy way.

cheers

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.