Rinkoou
Awful-Pun Master
- 54
- Posts
- 8
- Years
- the Internet
- Seen Jul 27, 2018
Hi, I'm working on seasons in Essentials v17.2, and I can't get it to work. When starting the game, this error message would immediatly appear:
Here is my code:
The purpose of the script is to change the maps using the tileset using ID 1into the tileset corresponding to the month the player is playing during. If anybody could help, that'd be great!
Code:
Script 'TilesetSeasons' line 12: NoMethodError occurred.
undefined method 'tileset' for nil:NilClass
Here is my code:
Code:
seasoncheck=Time.now.mon
if seasoncheck=3 || seasonscheck=4 || seasoncheck=5
season=9
elsif seasoncheck=6 || seasoncheck=7 || seasoncheck=8
season=10
elsif seasoncheck=9 || seasoncheck=10 || seasoncheck=11
season=11
elsif seasoncheck=12 || seasoncheck=1 || seasoncheck=2
season=12
end
if (@map.tileset_id==1)
return season
else
return @map.tileset_id
end
The purpose of the script is to change the maps using the tileset using ID 1into the tileset corresponding to the month the player is playing during. If anybody could help, that'd be great!