lep / pjass

The famous jass syntax checker.
BSD 2-Clause "Simplified" License
25 stars 6 forks source link

Wrong report of symbol multiply defined for AI scripts #9

Closed tdauth closed 6 months ago

tdauth commented 6 months ago

It reports Symbol multiply defined for all functions in separate AI scripts and functions which I copied from Blizzard.j into my custom common.ai. AI scripts and common.ai should be handled separately by default. common.ai and AI scripts only can use symbols from common.j and not blizzard.j or other AI scripts.

lep commented 6 months ago

I can mostly guess what you mean exactly but pjass doesn't really have any concept of common.j or ai scripts. It just takes whatever files you give it. In a normal map script which pjass is mostly used for it's an error to re-declare symbols. If you have multiple scopes you probably should call pjass multiple times.

tdauth commented 6 months ago

I can try to change that and try to not specify blizzard.j at all. However, it would have been a really short command otherwise :(

D:\wowr\pjass.exe D:\wowr\wc3reforged\common.j D:\wowr\wowr.w3x\scripts\common.ai D:\wowr\wc3reforged\blizzard.j D:\wowr\wowr.w3x\war3mapImported\*.ai

Now I need a for each loop in a Windows batch for each AI file :(

edit: Okay got it now like this without specifying the blizzard.j:

for %%f in (D:\wowr\wowr.w3x\war3mapImported\*.ai) do D:\wowr\pjass.exe D:\wowr\wc3reforged\common.j D:\wowr\wowr.w3x\scripts\common.ai %%f