playMaker

Author Topic: Store Two Strings into one index array  (Read 1445 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
Store Two Strings into one index array
« on: November 18, 2016, 12:18:56 PM »
Let me elaborate :)

We are registering players for our game.

I need to store these 2 separate string variables
-playerName
-playerResId

into one array so that

index = 1 is "bob" with avatar "avt34" for example.

Can anyone help me out?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Store Two Strings into one index array
« Reply #1 on: November 19, 2016, 02:35:06 AM »
Hi,
I would just use 2 arrays and use the index number the get both strings.
So one for 'playerName' and one for playerResId.

Else you could build the 2 strings together and use a separator ( | or - for example)
Then place it into the array and when you get the string you need to split the string again.

So 2 string into 1 array has a lot more steps to do...