There are also a number of errors in the code you posted. Extra ()'s for example, and a missing Endif.

 Code:
$Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
$Val="EnableLUA"
$Type="REG_DWORD"
$Entry = ReadValue($Key,$Val) 
? $Entry
IF $Entry = 1 
   $NewEntry= 0
   $nul = WriteValue($Key, $Val, $NewEntry, $Type)
   ? ''+@ERROR+' - '+@SERROR
   If @error = 0
      ? "Value written"
   Else
      ? "Value not written!"
   Endif
Endif