AndyMg Posted May 21, 2021 Share Posted May 21, 2021 Hi folks.Trying to recompile a .psc to .pex that was decompiled by Champollion. ScrapSCRIPT.psc(147,23): no viable alternative at character '#'ScrapSCRIPT.psc(147,33): required (...)+ loop did not match anything at input '[' Do these errors indicate Champollion didn't quite decompile correctly or is something else going on? Here is the original line:script#scrapitem[] ScrapCosts script.scrapitem[] ScrapCosts reduces the errors to just the loop error but only guessed at this. The line isn't something I edited. Does anybody have any thoughts? Cheers Link to comment Share on other sites More sharing options...
DieFeM Posted May 21, 2021 Share Posted May 21, 2021 (edited) Indeed Champollion can fail decompiling, I had the very same issue decompiling only once, but I don't know what's the factor that produces such decompiling issues, fortunately I had the luck of getting the original source files and they where pretty different in some areas. The script I was working on was extending custom scripts with multiple levels of namespaces and used multiple imports for different scripts, so my guess is that this script# thingy is some pointer to a struct defined in another script that should be decompiled in first place, but that is just a guess. Edited May 21, 2021 by DieFeM Link to comment Share on other sites More sharing options...
niston Posted May 22, 2021 Share Posted May 22, 2021 Replace the # with :It's mostly with namespaces where this happens.I think Champollion sometimes also mistakenly decompiles . as #, but not sure if I remember this correctly. Link to comment Share on other sites More sharing options...
AndyMg Posted May 22, 2021 Author Share Posted May 22, 2021 Thanks guys. Using a colon let the compile complete cheers niston :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts