pajodex Posted January 22, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Share Posted January 22, 2018 (edited) Hi, Anyone who can help me with this? I'm using custom mobs and custom item rewards. I get error when I try to kill the mob in console [Error]: get_val_: fatal error ! player not attached! [Debug]: Function: getmonsterinfo (2 parameters): [Debug]: Data: param name='killedrid' type=122 [Debug]: Data: number value=3000 [Debug]: Source (NPC): #summon_mpv at 1#force_1-1 (0,0) [Warning]: script:get_val: cannot access player variable 'killedrid', defaulting to 0 [Info]: [Instance] Destroyed 1. [Error]: Memory manager: args of aFree 0x274B79E4 is invalid pointer h:\dxro\rathena\src\map\map.cpp line 241 This is the part of the script when mob is summoned and killed force_1-1,0,0,0 script #summon_mpv -1,{ end; OnEnable1: .@map$ = instance_mapname("force_1-1"); .@label_g$ = instance_npcname(strnpcinfo(0))+"::OnDeathGr"; monster .@map$,26,174,"--ja--",3000,1,.@label_g$; OnDeathGr: if ( getmonsterinfo( killedrid, 3000 )) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 33001, 1, .@partymemberaid[ rand( .@c ) ]; warp "prontera",156,191; instance_destroy(); announce "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and got reward at "+ strcharinfo(3), bc_all; } else { getitem 33001, 1; instance_destroy(); warp "prontera",156,191; announce "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and got reward alone at "+ strcharinfo(3), bc_all; } //getitem 33001,1; end; } } The code works well if it's not in instance. But when I put it in instance, I get this error. Thanks UPDATE: Forgot to add "end;" OnEnable1: .@map$ = instance_mapname("force_1-1"); .@label_g$ = instance_npcname(strnpcinfo(0))+"::OnDeathGr"; monster .@map$,26,174,"--ja--",3000,1,.@label_g$; **end;** Now only thing left is when I kill the mob, I get this error: [Error]: Memory manager: args of aFree 0x20CC3684 is invalid pointer h:\dxro\rathena\src\map\map.cpp line 241 Edited January 22, 2018 by pajodex Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted January 22, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: 4 hours ago Share Posted January 22, 2018 OnPCDieEvent: This special label triggers when a player dies. The variable 'killerrid' is set to the ID of the killer. OnPCKillEvent: This special label triggers when a player kills another player. The variable 'killedrid' is set to the ID of the player killed. OnNPCKillEvent: This special label triggers when a player kills a monster without label. The variable 'killedrid' is set to the Class (mob ID) of the monster killed. Quote Link to comment Share on other sites More sharing options...
Question
pajodex
Hi,
Anyone who can help me with this?
I'm using custom mobs and custom item rewards. I get error when I try to kill the mob in console[Error]: get_val_: fatal error ! player not attached! [Debug]: Function: getmonsterinfo (2 parameters): [Debug]: Data: param name='killedrid' type=122 [Debug]: Data: number value=3000 [Debug]: Source (NPC): #summon_mpv at 1#force_1-1 (0,0) [Warning]: script:get_val: cannot access player variable 'killedrid', defaulting to 0 [Info]: [Instance] Destroyed 1. [Error]: Memory manager: args of aFree 0x274B79E4 is invalid pointer h:\dxro\rathena\src\map\map.cpp line 241
This is the part of the script when mob is summoned and killedforce_1-1,0,0,0 script #summon_mpv -1,{ end; OnEnable1: .@map$ = instance_mapname("force_1-1"); .@label_g$ = instance_npcname(strnpcinfo(0))+"::OnDeathGr"; monster .@map$,26,174,"--ja--",3000,1,.@label_g$; OnDeathGr: if ( getmonsterinfo( killedrid, 3000 )) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 33001, 1, .@partymemberaid[ rand( .@c ) ]; warp "prontera",156,191; instance_destroy(); announce "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and got reward at "+ strcharinfo(3), bc_all; } else { getitem 33001, 1; instance_destroy(); warp "prontera",156,191; announce "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and got reward alone at "+ strcharinfo(3), bc_all; } //getitem 33001,1; end; } }
The code works well if it's not in instance. But when I put it in instance, I get this error.
Thanks
UPDATE: Forgot to add "end;"
OnEnable1: .@map$ = instance_mapname("force_1-1"); .@label_g$ = instance_npcname(strnpcinfo(0))+"::OnDeathGr"; monster .@map$,26,174,"--ja--",3000,1,.@label_g$; **end;**
Now only thing left is when I kill the mob, I get this error:
[Error]: Memory manager: args of aFree 0x20CC3684 is invalid pointer h:\dxro\rathena\src\map\map.cpp line 241
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.