kilow Posted July 4, 2021 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 42 Reputation: 1 Joined: 05/18/20 Last Seen: October 22, 2024 Share Posted July 4, 2021 (edited) Hello, Can someone tell me why this script don't return char id? Quote bg_get_data(.red, 1); for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) { .teamcid[.@i] = convertpcinfo($@arenamembers[.@i],CPC_CHAR); } party_create("teamredred",.teamcid[1]); .partyid = $@party_create_id; for ( .@i = 1; .@i < getarraysize(.teamcid)-1; ++.@i ) { party_addmember(.partyid,teamcid[.@i]); } i also tried this : Quote bg_get_data(.red, 1); for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) { .teamname[.@i] = rid2name($@arenamembers[.@i]); } for ( .@i = 0; .@i < getarraysize(.teamname)-1; ++.@i ) { .teamcid[.@i] = getcharid(0,.teamname[.@i]); } party_create("teamredred",.teamcid[0]); .partyid = $@party_create_id; for ( .@i = 1; .@i < getarraysize(.teamcid)-1; ++.@i ) { party_addmember(.partyid,teamcid[.@i]); } Thank you Edited July 4, 2021 by kilow Quote Link to comment Share on other sites More sharing options...
0 Litro Endemic Posted July 7, 2021 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 283 Reputation: 79 Joined: 06/13/13 Last Seen: June 7, 2023 Share Posted July 7, 2021 try debuging the output of .teamname and .teamcid with debugmes, you can see where it gone wrong. Quote Link to comment Share on other sites More sharing options...
0 kilow Posted July 7, 2021 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 42 Reputation: 1 Joined: 05/18/20 Last Seen: October 22, 2024 Author Share Posted July 7, 2021 Finally, i made a npc that the first player who has a party and click on the npc, his team is registered and other can join by clicking. Not usual but it works. Thank you for your answer Quote Link to comment Share on other sites More sharing options...
Question
kilow
Hello,
Can someone tell me why this script don't return char id?
i also tried this :
Thank you
Edited by kilowLink 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.