name = "Bob"
number = 5

this_is_a_table = { x = "string", y = 10, z = "string1" }
another_table = {1,2,3,4,5}

function change_name()
	name = "Bob2"
	local t1
	local t2
	local t3
	t1,t2,t3 = multi_return()
	print( t1,t2,t3)
	
	print( another_table[0] )
	print( another_table[1] )
	print( another_table[2] )
--	for k,v in pairs(this_is_a_table) do
--		print(k,v)
--	end
end

function my_print(name, number)
	print(name, number)
	c_function(name, number)
end

function multi_return()
local t1 = 1
local t2 = 2
local t3 = 3

return t1,t2,t3
end

function register_environment(x, y)
	--print(x,y)
	RegisterEnvironmentLua(x, y)
end

function move_right(id, distance)
	MoveRight(id, distance)
end

function kill(id)
	Kill(id)
end

function change_gravity()
  Change_Gravity_Lua(9.9)
end

function collision_checkpoint()
	SetNewCheckpoint()
end

function collision_coin()
	num_coins = GetNumCoins()
	SetNumCoins(num_coins + 1)	
	PlaySound(5)
	
	if (num_coins + 1) == 100 then
		num_lives = GetNumLives()
		SetNumLives(num_lives + 1)
		PlayOneUpSound()
		SetNumCoins(0)
	end
		
end

function collision_spike()
	KillPlayer()
end

function collision_weight()
	weight = GetWeight()
--	print (weight)
--	O_weight = not weight
--	print (O_weight)
	if(weight == 0) then
		weight = 1
	else
		weight = 0
	end
	SetWeight(weight)
end
