{"action":"opened","issue":{"url":"https://api.github.com/repos/okamstudio/godot/issues/1109","labels_url":"https://api.github.com/repos/okamstudio/godot/issues/1109/labels{/name}","comments_url":"https://api.github.com/repos/okamstudio/godot/issues/1109/comments","events_url":"https://api.github.com/repos/okamstudio/godot/issues/1109/events","html_url":"https://github.com/okamstudio/godot/issues/1109","id":53325117,"number":1109,"title":"Debugger Points To Incorrect Code Line in Base GDScript File","user":{"login":"SolarLune","id":4733521,"avatar_url":"https://avatars.githubusercontent.com/u/4733521?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarLune","html_url":"https://github.com/SolarLune","followers_url":"https://api.github.com/users/SolarLune/followers","following_url":"https://api.github.com/users/SolarLune/following{/other_user}","gists_url":"https://api.github.com/users/SolarLune/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarLune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarLune/subscriptions","organizations_url":"https://api.github.com/users/SolarLune/orgs","repos_url":"https://api.github.com/users/SolarLune/repos","events_url":"https://api.github.com/users/SolarLune/events{/privacy}","received_events_url":"https://api.github.com/users/SolarLune/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-04T04:43:09Z","updated_at":"2015-01-04T04:43:09Z","closed_at":null,"body":"Really verbose title, but it's not too difficult to understand. Basically, you have a \"base\" file and you require an instance of a class from an external file. If that class references a variable that doesn't exist, the debugger will point to the error in the line number of the class, but in the \"base\" GDScript file. The error will be: `invalid set index 'keycode' (on base: 'Reference ()\").` \r\n\r\nHere are the example script files:\r\n\r\nThe base .gd file:\r\n```\r\nextends Spatial\r\n\r\nvar other = preload(\"res://external/input.gd\")\r\n\t\r\nfunc _ready():\r\n\t\r\n\tvar input_key = other.InputKey.new(other.IT_KEY, \"A\")\r\n```\r\n\r\ninput.gd\r\n```\r\nconst IT_KEY = 0\r\n\r\nclass InputKey:\r\n\r\n\tvar input_type\r\n\t#var keycode  # What's necessary to make it work\r\n\t\r\n\tfunc _init(input_type, keycode):\r\n\r\n\t\tself.input_type = input_type\r\n\t\tself.keycode = keycode\r\n```"}}