Jump to content
  • 0

[Error]: buildin_getcharid: Player with nick '' is not found


Murasaki

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  09/19/20
  • Last Seen:  

Hello, im getting this error in the console about this part of the script

 

// Now lets kick everyone else out!
        for (set .@i,0; .@i<=$avthana_countusers; set .@i, .@i+1 ) {
            if ($avthana_winnerparty$!=$avthana_mapusers$[.@i] && $avthana_winnerparty$!=getpartyname(getcharid(1,$avthana_mapusers$[.@i]))) {
                getmapxy(.@mapname$,.@mapx,.@mapy,BL_PC,$avthana_mapusers$[.@i]);
                if (.@mapname$=="thana_boss") charcommand "#return "+$avthana_mapusers$[.@i];
            }
            // Get rid of the data at the same time!
            set $avthana_mapusers$[.@i],"";
        }

        // All done. Lets remove the data.
        for (set .@i,0; .@i<=4; set .@i, .@i+1 ) {
            set $avthana_seal$[.@i],"";
            set $avthana_party[.@i],0;
        }
        set $avthana_countusers,0;
        set $avthana_winnerparty$,"";
        set $avthana_winner,0;
        
        ////////////////////////////////////
        /// BACK TO NORMAL THANATOS CODE ///
        ////////////////////////////////////

        monster "thana_boss",140,217,"Despair",1710,1,"#Death::OnWave";
        monster "thana_boss",140,216,"Hatred",1709,1,"#Death::OnWave";
        monster "thana_boss",141,217,"Misery",1711,1,"#Death::OnWave";
        monster "thana_boss",141,216,"Agony",1712,1,"#Death::OnWave";
        disablenpc "Crest#5";
        close;
    }
    input @input$;
    mes "^3355FFNothing happened.^000000";
    close;
}
 

anyone know how to fix it?

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

may try change


        for (set .@i,0; .@i<=$avthana_countusers; set .@i, .@i+1 ) {
            if ($avthana_winnerparty$!=$avthana_mapusers$[.@i] && $avthana_winnerparty$!=getpartyname(getcharid(1,$avthana_mapusers$[.@i]))) {
                getmapxy(.@mapname$,.@mapx,.@mapy,BL_PC,$avthana_mapusers$[.@i]);
                if (.@mapname$=="thana_boss") charcommand "#return "+$avthana_mapusers$[.@i];
            }
            // Get rid of the data at the same time!
            set $avthana_mapusers$[.@i],"";
        }

into

for (set .@i, 0; .@i <= $avthana_countusers; set .@i, .@i + 1) {
	// party name matched
	if ($avthana_winnerparty$ == $avthana_mapusers$[.@i]) 
		continue;
	
	// player not found
	if (getmapxy(.@mapname$, .@mapx, .@mapy, BL_PC, $avthana_mapusers$[.@i])) 
		continue;
	
	// party name matched
	if ($avthana_winnerparty$ != getpartyname(getcharid(1, $avthana_mapusers$[.@i]))) {
		if (.@mapname$ == "thana_boss") 
			charcommand "#return "+$avthana_mapusers$[.@i];
	}
	
	// Get rid of the data at the same time!
	set $avthana_mapusers$[.@i],"";
}

 

Link to comment
Share on other sites

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.

×
×
  • Create New...