Var passed through functions - cant compare

Posted By: Stansmedia

Var passed through functions - cant compare - 08/17/14 19:25


Code:
var continue_level;

function level_switch(var* numberlvl)
{
	if(numberlvl > continue_level)
	{
		continue_level = numberlvl;
	}
}



Gives me error: Wrong type GT:POINTER:FIXED:LONG if(numberlvl > continue_level)
Posted By: 3run

Re: Var passed through functions - cant compare - 08/17/14 19:31

Originally Posted By: Stansmedia
Gives me error: Wrong type GT:POINTER:FIXED:LONG if(numberlvl > continue_level)
What if you remove * after defining the var?
Code:
function level_switch(var numberlvl){
}

Otherways you are creating a pointer, thats why you are getting a crash (just a quick idea, I need to get some sleep now grin ).

Greets
Posted By: Stansmedia

Re: Var passed through functions - cant compare - 08/17/14 19:44

uggghhhhhhh

thanks! tongue
© 2024 lite-C Forums