kilow Posted July 4, 2021 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
0 Litro Endemic Posted July 7, 2021 Posted July 7, 2021 try debuging the output of .teamname and .teamcid with debugmes, you can see where it gone wrong. Quote
0 kilow Posted July 7, 2021 Author 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
Question
kilow
Hello,
Can someone tell me why this script don't return char id?
i also tried this :
Thank you
Edited by kilow2 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.