I tried if ((is_city) == 1){ but the terminal game me a message:
Code: Select all
←[Knmlc ERROR: "CRABS.nml", line 38: Unrecognized identifier 'is_city' encountered
Moderator: Graphics Moderators
Code: Select all
←[Knmlc ERROR: "CRABS.nml", line 38: Unrecognized identifier 'is_city' encountered
Hence, you must be in one of those scopes to be able to use it.Towns aren't a NewGRF feature of their own but town variables can be accessed via the parent scope of stations, houses and industries.
Code: Select all
property = is_city ? 1 : 0;
Code: Select all
if ((is_city) == 1){
replace dirt_road (1332, "gfx/test.png"){
template_roads(1, 1)
}
}else{
replace sett_road (1332, "gfx/test.png"){
template_roads(1, 42)
}
}
Users browsing this forum: No registered users and 16 guests