Okay now about the problem with the player storing. For example I have a dialog, opens up when a player press ESC. For example this dialog shows up "Increase Stats" and "Decrease Stats". When one of these buttons are pressed, then another dialog shows up, by which amount the stats should be decreased.
The problem I see is: When a player presses one of the amount buttons, the event for it is "TriggerRegisterDialogEvent". When a player now presses a button, how can I increase the stat of the hero controlled by the "button-pressed-player"?
To solve this problem I first thought about using hashtable, store the player and load him again, the problem there is I don't know what the HandleId is, if I need one but sure I need one. Then I thought maybe I use the dialog as the HandleId but don't know =S
call SavePlayerHandle(table,GetHandleId(dialog),TableNumber,GetPlayerId(GetTriggerPlayer()))
//
local player p = LoadPlayerHandle(table,GetHandleId(dialog),TableNumber)
Edit: Actually I just need to store the id of the player .. so actually I can save it as an integer but then I have the HandleId problem and .. bah see when I think about hashtables it's getting weird =D
Edit2: Well I just noticed that I can't do the example because GetPlayerId returns an integer where it must return a unit >_>