I am new to Python and my question may be very basic
I would like to convert my python code to a script tool in ArcGIS. The code used is written below and it worked fine and got the output raster named Stak123. But when i make this code into a script tool, i want the output name to be decided by the user who runs the tool. To solve this I was thinking if i add an output folder (Out_Fold) as GetParameterAsText and then in the tool i just put any new name in the output folder for the output raster. But when i ran it in ArcGIS as a tool I got the message it is completed but could not find the output raster. How to fix this?
from arcpy import env
from arcpy.sa import *
arcpy.env.overwriteOutput = True
env.workspace = r"H:\Stak1108"
arcpy.env.cellSize = "MINOF"
# Assigned paramater as text for the tool
Elevation = arcpy.GetParameterAsText(0)
Out_Fold = arcpy.GetParameterAsText(4)
Raster1 = Raster("Elevation")
# The conditionals were applied in the input rasters
Stak123 = Con(Raster1 = 1,3)........
#Saving the output