If you can't get the value how do you know you are actually setting it? Neither get or set state functions will inform you if are trying to read or write to a variable that can't be found or doesn't exist. Are you sure your variable can be found?
Hello Phrozo thanks for the reply, I'm really not sure of anything, I'm still learning this stuff, because gui scripting tutorials are so scarse, I'm learning by trial and error, the only thing I'm sure of, is that when inspecting the gui in the visual studio watch window, I see that at lest the variable name I wrote in the gui desktop is there.
In the case of set, at lest for variables using "gui::varname" I know I'm setting the values from the c++ side because they work, for other vars I never really tried, I've used namedEvents for the most part, never tried to "get" a variable value back from the gui.
I also see that Id almost never used GetStateInt or others like it, so perhaps I'm just not thinking this in the right way, but for now I can't see how I could make what I'm trying to make without retrieving a var value from the gui.
Tell me, what would you do, if you add a inventory system where you have a grid based look and you assign different items to each slot (this part already works fine), the "grid" in the c++ side is just a array of structs, with info like, slot ID, what item is in what slot, a icon path, a item counter per slot, etc, ( I use namedEvents and gui::varname, to assign the right info to the right "slot" in the gui file), but then you wanted to have the ability to click in a particular slot (onAction) and have that affect the right array index in the c++ side?
I know I can use set "some cmd name", by using the "handle single gui cmds" function from the player.cpp, like id did but for that, I think I need to do different cmd's to every item in the inventory, if they happen to be in different slots, for example, if I wanted to remove a key from slot 1 in the inventory, I would need to do, a remove key1 function, do another function to remove key2 from slot 2, etc, instead of the a single - set "removeItem" function and have that remove the right item from the right gui slot and the right array index. Why I think so? Because afaik there's no way to tell the c++ code in what window a particular onAction was triggered without using variables ?
Again I may be thinking all this wrong (most likely) and there's a simple way to do that I'm just ignorant about.
AFAIK this works like entity -> somegui -> parm. Then parm is for entity, not for gui itself (not sure about pda gui, perhaps the player is that entity).
That is right and for the pda gui the player is indeed the entity, the pda gui is called from the player def file, still don't know how this can help me, do I need to define the var with gui::varname for "get" like I do for set ? Not near my pc so can't test.