Help passing form data to function

Help passing form data to function

Hi

I'm new to functions and am struggling to understand how to pass arguments relating to forms/subforms. I have written the below function. This executes within the form Projects, which contains the subform Schedule, and each record in Schedule contains a field called Started.

bool Projects.CheckIfProjectStarted(Projects project)
{
count = 0;
for each  r in project.Schedule
{
if(r.Started = "Yes")
{
count = count + 1;
}
}
if(count > 0)
{
return true;
}
else
{
return false;
}
}

This function is called with the following script:

if (thisapp.Projects.CheckIfProjectStarted(ID) == false)
{
input.Project_Started = "No";
}
else 
{
input.Project_Started = "Yes";
}

However, attempting to save the second script (workflow) above gives this error message:

Error at line number: 1
Mismatch data type for function 'CheckIfProjectStarted' at argument index 1 expected data type Projects found data type BIGINT.

How do I correctly pass the current project ID number to the function? (Or do I need to change the way the workflow and function are communicating with each other in some other way?)

Sorry for the elemetary question and thanks in advance!