Are you just trying to read a value from the RoadsClipped attribute table and use that to derive the cost? If so, you don't need a Script evaluator. You can use a Field evaluator. Like with script, click on Evaluator Properties to open up the dialog where you can set up some pre-logic script code.
This was your python example from before:
def SetCost(value):
a=Edge.AttributeValueByName(value)
c=0
if l!=0:
c=100/a
return c
value=SetCost("SPEED_LIM")
Note that for a field evaluator, you do not need Edge.AttributeValueByName(value). In this case, "value" will be the field value read from the RoadsClipped attribute table.
So, let's just say the speed limit is 30, as an example. You don't need the "a" variable at all. You can just use "value".
def SetCost(value):
c=0
if l!=0:
c=100/value
return c
value=SetCost("SPEED_LIM")
What is "l"? I think this is where your problem lies. As Dan says above, this variable isn't defined.