Jump to content
  • 0
LipESprY

[Solved] How to check if a player is attached? // strcharinfo(0)

Question

Hello, community!

I'm developing a NPC and I've a problem: Player not attached (see below)

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: strcharinfo (1 parameter):
[Debug]: Data: number value=0
[Debug]: Source (NPC): LSI_TestScript (invisible/not on a map)

I need a function/syntax to check if a player is attached.

First, I tried this, bot not worked: 

set .@invoker, strcharinfo(0) ? strcharinfo(0) : "Unknown";

I need to use "getitem" and "announce" when the mob is killed, but if this mob is killed by a mercenary or by @killmonster command, it haven't a player attached and show error on map-server's console.

Anyone have a awesome idea for solve this problem?

Tnks!

Edited by LipESprY
Solved

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.