Macro/file is missing
Moderator: Forum Moderators
Macro/file is missing
The following is code I copypasted from the wiki.
The error: Macro/file 'terrain' is missing
Tracestack:
[multiplayer]->[event](preload)->[lua]
I suspect that scenario and/or preload has something to do with this, because similiar code works fine in other addons.
for i,loc in ipairs(wesnoth.map.find{terrain = "Gg"}) do
wesnoth.current.map[loc] = "Rr"
end
The error: Macro/file 'terrain' is missing
Tracestack:
[multiplayer]->[event](preload)->[lua]
I suspect that scenario and/or preload has something to do with this, because similiar code works fine in other addons.
- Celtic_Minstrel
- Developer
- Posts: 2371
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Macro/file is missing
You haven't shown your full code, so it's difficult to be sure of what you're doing. However, most likely the solution is this:
The key point is the use of
Code: Select all
[lua]
code=<<
for i,loc in ipairs(wesnoth.map.find{terrain = "Gg"}) do
wesnoth.current.map[loc] = "Rr"
end
>>
[/lua]
<<
and >>
to let the WML preprocessor know that {terrain = "Gg"}
is not a macro and should be left alone.Re: Macro/file is missing
Wow, that was easy solved thank you