Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script actions are not always decompiled correctly #207

Open
Argent77 opened this issue Nov 1, 2021 · 1 comment
Open

Script actions are not always decompiled correctly #207

Argent77 opened this issue Nov 1, 2021 · 1 comment
Labels

Comments

@Argent77
Copy link
Contributor

Argent77 commented Nov 1, 2021

The following script is not decompiled correctly in Enhanced Edition games:

IF
  True()
THEN
  RESPONSE #100
    UseItemSlotAbility(Myself,SLOT_AMULET,1)
END

Result after decompiling:

IF
  True()
THEN
  RESPONSE #100
    UseItemSlot(Myself,SLOT_AMULET)
END
@FredrikLindgren
Copy link
Member

This happens with all overloaded opcodes. WeiDU resolves the ambiguity by taking whatever's at the top of the symbol stack (IIRC). I'd have to figure out some way of decompiling into the right symbol from the byte code. I'll have a closer look at some point, but I don't think it's a quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants