Jump to content
  • 0

H> Cock Fight error


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

hello everyone did you experience this error too?
 

Quote

[Error]: get_val_: fatal error ! player not attached!
[Debug]: Source (NPC): mob_vs_mob_main (invisible/not on a map)
[Warning]: script:get_val: cannot access player variable 'MD_CANATTACKMOB', defaulting to 0


Lines:
 

Quote

                }
            
                .@mob_gid_1 = bg_monster(1, .map$, 51, 87, "--ja--", .mob_id_1,  .npc_name$+"::OnKill1");
                .@mob_gid_2 = bg_monster(2, .map$, 64, 87, "--ja--", .mob_id_2,  .npc_name$+"::OnKill2");
            
                getunitdata .@mob_gid_1, .@unitdata;
                setunitdata .@mob_gid_1, UMOB_MODE, .@unitdata[UMOB_MODE] | (MD_AGGRESSIVE|MD_CANATTACK|MD_CANATTACKMOB);
                setunitdata .@mob_gid_2, UMOB_MODE, .@unitdata[UMOB_MODE] | (MD_AGGRESSIVE|MD_CANATTACK|MD_CANATTACKMOB);

            
                while (!.winner_mob_id) {
                    unitattack .@mob_gid_1, .@mob_gid_2;
                    unitattack .@mob_gid_2, .@mob_gid_1;
                    sleep 2000;
                }

 

Edited by GM Winter
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

Your script thinks MD_CANATTACKMOB is a permanent variable attached to a character, but since this script doesn't get executed by a character, there is no rid attached.
Therefore, the parser doesn't have a character it can get the MD_CANATTACKMOB variable from and defaults to 0.

The reason why the parser thinks MD_CANATTACKMOB is a permanent character variable is because it isn't an existing monster mode flag.
This means there is also no constant exported to the script space.
 

Edited by Winterfox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

11 hours ago, GM Winter said:

hello everyone did you experience this error too?
 


Lines:
 

 

Ask support to the author.

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...