OIL_(cargo_allow_refit) cannot be used in ship
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 2
- Joined: 09 Dec 2022 12:56
OIL_(cargo_allow_refit) cannot be used in ship
The property cargo_allow_refit cannot be set as OIL_, it will output "Unrecognized identifier 'OIL_' encountered" when compiling. When I set the real integer behind OIL_(I think is 3. Sourceshttps://github.com/OpenTTD/OpenTTD/blob ... go_const.h) it just won't let me refit with oil in openttd. Is it a setting that prohibited ship from carrying oil? or how can I make this right?
- Emperor Jake
- Tycoon
- Posts: 3437
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: OIL_(cargo_allow_refit) cannot be used in ship
Are you trying to edit the refits of vehicles from within the actual game code? Why not just make a NewGRF, that's what they're here for after all
-
- Engineer
- Posts: 2
- Joined: 09 Dec 2022 12:56
Re: OIL_(cargo_allow_refit) cannot be used in ship
Yeap, I am trying to make a newgrf. But when compiling the newgrf file, the nmlc compiler throw an error to me(the error is Unrecognized identifier 'OIL_' encountered). That what the problem is.
By the way, I can use cargo_allow_refit_classes to refit the oil.
By the way, I can use cargo_allow_refit_classes to refit the oil.
- Emperor Jake
- Tycoon
- Posts: 3437
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: OIL_(cargo_allow_refit) cannot be used in ship
In that case your code is probably missing a cargotable. This is where you need to specify any cargo IDs that you're going to reference.
See https://newgrf-specs.tt-wiki.net/wiki/NML:Cargotable
See https://newgrf-specs.tt-wiki.net/wiki/NML:Cargotable
Who is online
Users browsing this forum: No registered users and 1 guest