DavidD Posted February 16, 2012 Share Posted February 16, 2012 (edited) Hey there! I'm trying to call a function from another script. Obviously making it global is the way to to. When trying to call it the game thinks it's undeclared. Understandable since it can't know that it is. GlobalVariable property foo auto function func() foo.SetValueInt(1) foo.GetValueInt()endFunction Both get and set will fail so I thought that I could use a local variable. Nope. Global function calling a local function? Nope. Does anyone have any idea what to do? I'm experienced in programming just not papyrus so you don't have to explain like I'm 5 (hopefully) Edited February 16, 2012 by DavidD Link to comment Share on other sites More sharing options...
gsmanners Posted February 16, 2012 Share Posted February 16, 2012 I think the new paradigm is OOP. So, you actually create a base class, and then "extend" that. Globals and natives are not generally a good idea. Link to comment Share on other sites More sharing options...
DavidD Posted February 16, 2012 Author Share Posted February 16, 2012 Hey there! I'm trying to call a function from another script. Obviously making it global is the way to to. When trying to call it the game thinks it's undeclared. Understandable since it can't know that it is. GlobalVariable property foo auto function func() foo.SetValueInt(1) foo.GetValueInt()endFunction Both get and set will fail so I thought that I could use a local variable. Nope. Global function calling a local function? Nope. Does anyone have any idea what to do? I'm experienced in programming just not papyrus so you don't have to explain like I'm 5 (hopefully) I guess that would work. I seem to have misunderstood the inheritance. Thank you, I'll test and see if it'll work Link to comment Share on other sites More sharing options...
Recommended Posts