Jump to content
  • 0

Convert account id in charid?


Question

Posted (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 by kilow

2 answers to this question

Recommended Posts

  • 0
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...