Inventory.c script is getting famous by now grin .

Make an additional script file called 'variables.c' (without the quotes) or an other name you prefer. Place the variable player_gold in there instead of in your main script. Now add

Code:
#include "variables.c"



before you the #include "inventory.c" line.