Gui Button label
Closed this issue · 2 comments
alexvillehart commented
So, if you have a GUI and you have a button, example
Gui, Add, Button, default, OK
ButtonOK:
Gui, Destroy
Return
It will interfere with GUI functions and when using any UDF Functions it crashes the game.
Checking the debug window, this is the only error I could find
dwVehPtr := readDWORD(hGTA, ADDR_VEHICLE_PTR)
if (!hProcess)
VarSetCapacity(dwRead, 4)
dwRet := DllCall( "ReadProcessMemory", "UInt", hProcess, "UInt", dwAddress, "Str", dwRead, "UInt", 4, "UInt*", 0)
if (dwRet == 0)
ErrorLevel := ERROR_READ_MEMORY
Return,0
Tried the following solutions, none of them worked
- Running both script an SAMP in Administrative mode
- Ran SAMP as administrator, kept AHK as non-administrator
- Ran AHK as administrator, kept SAMP as non-administrator
paul-phoenix commented
UDF does not use any GUI functions nor access indirectly. So it's unlikely UDF related.
alexvillehart commented
Well then it's weird since It only happens whenever i've included ButtonOK in my keybinds, somehow the GUI Buttonhandler interferes with the UDF.