Error for some users when running script

Hi All,

   We have setup a button script to check Sales Order lines to make sure that the minimum order quantity has been entered.   When myself or an IT user runs it, it works fine (running from workstation - not the server).

   When an end user runs it they get this message:

This is the script.    I had thought that there is a problem because it is a button script but I would think it would fail for everyone so I am even more puzzled (granted I am a newbie a scripts)

ninnerqty = 0
nQtyordered = 0
nCorQty = 0
nUnitprice = 0
sitemcode = ""
stemp= ""
'
Set oSS_Script = oSession.AsObject(oSession.ScriptObject)
MASUI = cBool(oScript.UIObj)
oSS_Script.SetStorageVar "MASUI", MASUI

Set oLines = oBusObj.AsObject(oBusObj.Lines)
retVal = oLines.MoveFirst()

while Not(cBool(oLines.EOF))
retVal = oLines.GetValue("ItemCode", sitemcode)
retVal = oLines.GetValue("QuantityOrdered", nQtyordered)
retVal = oLines.GetValue("UnitPrice", nUnitprice)

Set oCIItem = oSession.AsObject(oSession.GetObject("CI_ItemCode_svc"))
retVal = oCIItem.SetKeyValue("ItemCode$",sitemcode)
retVal = oCIItem.find()
retval = oCIItem.GetValue("ItemCode$",stemp)
retVal = oCIItem.GetValue("UDF_INNER_PK_COUNT", ninnerqty)

if isnull(ninnerqty) <> true then
if ninnerqty > 1 then
if nQtyordered mod int(ninnerqty) <> 0 then
if nUnitprice <= 5 then

'If MASUI then
' retStrVal = oSession.AsObject(oSession.UI).MessageBox("","Inner pack size is " & cstr(ninnerqty) )
' retStrVal = oSession.AsObject(oSession.UI).MessageBox("","Inner pack size is " & cstr(ninnerqty) )
'end if
nCorQty = (int(nQtyordered / int(ninnerqty))+1) * ninnerqty
retVal = oLines.SetValue("QuantityOrdered", nCorqty)
retVal = oLines.Write()
'retStrVal = oSession.AsObject(oSession.UI).MessageBox("", cstr(nUnitprice) )
retVal = oLines.SetValue("Unitprice", nUnitprice)
retVal = oLines.Write()

end if
end if
end if
End if
retVal = oLines.MoveNext()

wend
oScript.LinesAdded = 1
retVal = oScript.LoadGrid("GD_Lines")

 Any insights would be appreciated!

Bob Osborn