pajodex Posted February 21, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Share Posted February 21, 2018 Hi, How do I add character id to an array. Sample: Array = .@char_id If Player A click NPC A. then Plaayer B clicks NPC A. Player A <CHAR_ID> will attach to .@char_id[0] Player B <CHAR_ID> will attach to same .@char_id[0] Thanks Quote Link to comment Share on other sites More sharing options...
0 Alayne Posted February 21, 2018 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 342 Reputation: 170 Joined: 02/25/12 Last Seen: January 24, 2022 Share Posted February 21, 2018 .char_id[getarraysize(.char_id)] = getcharid(0); You can't use .@char_id, as @ means temporary bound to the npc variable. It'll be cleaned when the script will hit it's end, and won't be shared through two instances running the script. On the other hand, with this method, you'll have to handle the cleaning manually. Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted February 21, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Author Share Posted February 21, 2018 1 hour ago, Alayne said: .char_id[getarraysize(.char_id)] = getcharid(0); You can't use .@char_id, as @ means temporary bound to the npc variable. It'll be cleaned when the script will hit it's end, and won't be shared through two instances running the script. On the other hand, with this method, you'll have to handle the cleaning manually. sweet thanks! Now things have more sense Quote Link to comment Share on other sites More sharing options...
Question
pajodex
Hi,
How do I add character id to an array.
Sample:
Thanks
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.