Jump to content
  • 0
kalabasa

buildin_strcharinfo: fatal error! player not attached!

Question

-    script    guide::guideme    -1,{

OnInit:
bindatcmd "guide", strnpcinfo(3) +"::Onguide";
    
Onguide:
if(getmapflag(strcharinfo(3),mf_gvg ) || getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg_castle)) {
        mes "[ Guide ]";
        mes "this command can only be used on ^FF0000 Towns. ^000000";
        end;

    }
    else {
    mes "[ Guide ]";
    mes "Hello, " + strcharinfo(0) + "!";
    mes "How may I help you?!";
Main:

 

i had this script where in you type @guide custom command 

but i recieving error and debug on console how to fix it?

Error buildin_strcharinfo fatal error player not attached

debug: function: strcharinfo (1 parameter):

debug: Data: number value=3 

debug source (NPC): guide(invisible/not on a map) 

debug source (NPC): guide(invisible/not on a map) 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1
8 hours ago, kalabasa said:

-    script    guide::guideme    -1,{

OnInit:
bindatcmd "guide", strnpcinfo(3) +"::Onguide";
    
Onguide:
if(getmapflag(strcharinfo(3),mf_gvg ) || getmapflag(strcharinfo(3),mf_pvp) || getmapflag(strcharinfo(3),mf_gvg_castle)) {
        mes "[ Guide ]";
        mes "this command can only be used on ^FF0000 Towns. ^000000";
        end;

    }
    else {
    mes "[ Guide ]";
    mes "Hello, " + strcharinfo(0) + "!";
    mes "How may I help you?!";
Main:

 

i had this script where in you type @guide custom command 

but i recieving error and debug on console how to fix it?

Error buildin_strcharinfo fatal error player not attached

debug: function: strcharinfo (1 parameter):

debug: Data: number value=3 

debug source (NPC): guide(invisible/not on a map) 

debug source (NPC): guide(invisible/not on a map) 

 

you forgot to end the OnInit event

just add end; below `bindatcmd "guide", strnpcinfo(3) +"::Onguide";`

  • Upvote 1
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...

Important Information

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