Issue information

Issue ID
#8024
Status
Invalid
Severity
None
Started
AnnieRuru
Feb 15, 2014 22:12
Last Post
Nameless2you
Feb 17, 2014 3:28
Confirmation
N/A

AnnieRuru - Feb 15, 2014 22:12

this is the script that I'm tackle
[url="http://upaste.me/e31f106314562bb17"]http://upaste.me/e31f106314562bb17[/url]

last time, instance_id(1) allows to return the ID of the instance from the party ID
then can use[code=auto:0] if ( strcharinfo(3) == has_instance("2@g_vs") ) { instance_attach instance_id(); // change into instance_id(1) and it throws error announce strcharinfo(0) +" die at killing "+ 'evil_clone_killed +" clones", bc_map; }[/code]reference -> [url="http://rathena.org/board/topic/72691-evil-clone-on-map-enter/?p=148875"]http://rathena.org/board/topic/72691-evil-clone-on-map-enter/?p=148875[/url]

but right now, instance_id(1) has been removed
ok, rathena also removed it, but their instance variable can still be read by script_instancegetid(st)
[url="http://rathena.org/board/tracker/issue-8418-rathenasrcmapclifc15771-in-func-unknown-when-instance-destroy/?gopid=24073#entry24073"]http://rathena.org/board/tracker/issue-8418-rathenasrcmapclifc15771-in-func-unknown-when-instance-destroy/?gopid=24073#entry24073[/url]
PS: that bug has nothing to do here ... just a reference

rathena instance variable can track using script_instancegetid(st)
[url="https://github.com/rathena/rathena/blob/master/src/map/script.c#L2617"]https://github.com/rathena/rathena/blob/master/src/map/script.c#L2617[/url]
but hercules couldn't
[url="https://github.com/HerculesWS/Hercules/blob/master/src/map/script.c#L2525"]https://github.com/HerculesWS/Hercules/blob/master/src/map/script.c#L2525[/url]
with instance_id(1) removed on both emulator, there's no way for hercules to read instance variable anymore

2 ways to solve this
1. reintroduce back instance_id(1)
2. follow rathena style to have script_instancegetid(st) on instance variable so no need to use instance_attach command

This post has been edited by AnnieRuru on Feb 15, 2014 22:16

Nameless2you - Feb 15, 2014 22:51

stray ' [url="http://upaste.me/e31f106314562bb17#L35"]http://upaste.me/e31f106314562bb17#L35[/url]

AnnieRuru - Feb 15, 2014 23:07

what do you mean by that ?

I mean my map-server.exe throw this error when I die from my clone[code=auto:0][Warning]: script_get_val: cannot access instance variable ''evil_clone_killed', defaulting to 0[/code]

Nameless2you - Feb 15, 2014 23:48

Only? Line 22, 28 just like line 35 have stray quotes..
Notice the odd colouring (overly present orange) in the paste you provided, it highlights that something is wrong, apparently there's more "string" there than should be.

This post has been edited by Nameless2you on Feb 15, 2014 23:50

AnnieRuru - Feb 16, 2014 6:34

have you click on the "Run this paste" button ?

do you know what is instance variable ?

yeah ... something is wrong ... haru needs fix the syntax highlighting for instance variable too
2 bug report in 1 :P


EDIT:
use rathena's pastebin
[url="http://rathena.org/board/pastebin/6iuyh76v5qvo/"]http://rathena.org/board/pastebin/6iuyh76v5qvo/[/url]
doesn't have this syntax highlight problem

This post has been edited by AnnieRuru on Feb 16, 2014 11:34

Nameless2you - Feb 16, 2014 20:25

Hmm, haruna has nothing to do with the highlighting, that's my part. Fixed that part, can't use 'this is a string' anymore though. Personally I never used instance variables, and I rarely see them being used so that's why it confused me, tis [size=2]is[/size] [size=1]embarrassing[/size].
The "Run" works fine for me after adding the map 2@g_vs to map_index.txt

AnnieRuru - Feb 16, 2014 21:18

2@g_vs is actually my custom map
I duplicate it from guild_vs2
so you can actually remove 2@g_vs from your map_index.txt

yes I rarely see anyone actually making instance script
that's why nobody know about this bug until now

[url="http://upaste.me/8f3d106471dd19dce"]http://upaste.me/8f3d106471dd19dce[/url]

I just figure out how to use *instance_attachmap
which is not very user friendly
let's just follow the doc says[code=auto:0]instance_attachmap("prontera", .@instance_id,1,"via");[/code]1 party created the map, and go in
the other party cannot go in the map anymore

rathena do "guild_vs2" becomes "1#guild_vs2"
but hercules "via" remains "via"
I wonder is this also cause memory leak ?

not just instance variable,
I also cannot do *instance_destroy because we don't have instance_id(1) nor script_instancegetid(st)
but rathena can do it =/

AnnieRuru - Feb 16, 2014 22:25

ok I missed out 1 script command
*has_instance2

[url="http://upaste.me/9b2110648e7662562"]http://upaste.me/9b2110648e7662562[/url]

invalid then <.<


EDIT: apparently hercules's instance system needs to use some tricks to get the way I want ...


EDIT2: lol ... has_instance2 is not colored in blue

This post has been edited by AnnieRuru on Feb 16, 2014 22:31

Nameless2you - Feb 17, 2014 3:28

has too
[color=#ffffff]jk I added it[/color]