Writes a scalar value to a node. Scalar values are individual atomic words.
Arguments:
node: The node in which to write the value.
sz: Size of the data type.
value: The value to write.
fmt: String representation of the data format, for example ``short'', ``signed int'' or ``double''.
typid: Reference to used data type. Must be set manually if using a compound data type, otherwise set it to -1.
Returns 1 if successful and 0 otherwise.