pajodex Posted February 21, 2018 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
0 Alayne Posted February 21, 2018 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
0 pajodex Posted February 21, 2018 Author 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
Question
pajodex
Hi,
How do I add character id to an array.
Sample:
Thanks
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.