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

Bug in (de)serialization with E2 includes #82

Open
CaptainPRICE opened this issue Apr 27, 2019 · 1 comment
Open

Bug in (de)serialization with E2 includes #82

CaptainPRICE opened this issue Apr 27, 2019 · 1 comment

Comments

@CaptainPRICE
Copy link

The following error appears:
sv: (lib/whatever)Unknown character found (\) at line 1, char 7

Steps to reproduce:

  • Spawn the following E2:

    main.txt

    print(1)
    #include "lib/whatever"
    print(3)

    lib/whatever.txt

    print("[whatever] Line 1")
    print("[whatever] Line 2")
  • Create the dupe of the spawned E2.

  • Open the dupe from the saved file (important).

  • Paste the saved dupe.

I have inspected the contents of the dupe (text) file quickly, and it seems like " chars from the main code/file are replaced with £ char, and newline is being replaced via char.
But, if you look at the code of the lib/whatever, you will see it didn't make those replacements on #include'd codes, it is seems like it is saving it using string.format("%q", contents_of_included_code).
I have tried to manually fix the dupe file, by doing replacements for the included code, but it seems to be non-fixable.
There's some bug with how E2 with #includes are being (de)serialized.

Here's the saved dupe file for faster bug reproduce:
e2_with_include.txt

@CaptainPRICE
Copy link
Author

Probably something has to be fixed in the following file:
https://github.com/wiremod/advduplicator/blob/master/lua/autorun/serialiser.lua

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

No branches or pull requests

1 participant