This has nothing to do with the range-element...
As you can see in this error-message, you got an error in line 956 while calling SetManyAttributes().
In your pastebin, 955 is such a call, so I guess it is this one.
With 1.4, this function is deprecated, haste documented the new Spawn() and SpawnHeader()
here.
You simple incorporate the options from SetManyAttributes into a SpawnHeader().