View Single Post
  #7    
Old December 12th, 2012, 10:55 AM
Theik's Avatar
Theik
Fancy Cape Knight
 
Join Date: Dec 2008
Age: 26
Gender:
Quote:
Originally Posted by ppooookkkkkkk View Post
Actually if i add the clean code the script would'nt work and also i have not modified it just added the filenames

Actually if i add the clean code the script wont work and also i did'nt modified the script i just added the filenames
You misunderstood the instructions, you are not supposed to add your file names into the code.

Code:
def pbGetTileset(name,hue=0)     
if Time.now.mon==2 or Time.now.mon==3 or Time.now.mon==4       
if File.exists?("Graphics/Tilesets/Spring_"+name)         
return AnimatedBitmap.new("Graphics/Tilesets/Spring_"+name,hue).deanimate       
else         
return AnimatedBitmap.new("Graphics/Tilesets/"+name,hue).deanimate
end
When you call that function, the name you give to the function is automatically placed behind spring_.

For example,call the function with name 'hello.png' and you'd get Graphics/Tilesets/Spring_hello.png

You're not supposed to manually go in and add your file names where it says name, that happens automatically when the function is called.
Reply With Quote