if GVSetDouble returns the element location the value was stored. Otherwise it would return -1. To retrieve a value at an specific location you can use the corresponding GVGet... functions.
You might find the Global Variable documentation and examples helpful (it should be available here in the forum).