Accessing Variable Set in Project Script

I have a variable that is declared in the Project Script:


global gJobNumber

on launched theApplication
set gJobNumber to 0
end launched

In a second script, I need to change the variable. I’m doing it like this:


tell script "Project Script"
set gJobNumber to 1
end tell

In a third script I need to find out what gJobNumber was set to and am trying to do it like this:


set x to gJobNumber of script "Project Script"

I get an error: “Can’t make gJObNumber of script “Project Script” into type reference.”

I am not sure that I am going about this the correct way and cannot find any information in searching the forums. Your help would be most welcome!