I'm trying to add a pre-mine block to a coin I'm creating for fun, as shown below:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
int64 nSubsidy = 500 * COIN;
+ if(nHeight == 2)
{
+ nSubsidy = 2000 * COIN;
+ }
// Subsidy is cut in half every 840000 blocks, which will occur approximate$
nSubsidy >>= (nHeight / 840000); // Funbuck: 840k blocks in ~4 years
return nSubsidy + nFees;
}
However, when I attempt to compile
(make -f makefile.unix USE_UPNP=-)
the following error is returned:
main.cpp: In function ‘int64 GetBlockValue(int, int64)’:
main.cpp:1091:5: error: expected primary-expression before ‘if’
+ if(nHeight == 2)
^
main.cpp:1091:5: error: expected ‘;’ before ‘if’
make: *** [obj/main.o] Error 1
What am I doing wrong?