Pass variables of types like File or Text to timer function?
#1

Hi,

how can I pass a variable initialized with a type like File or Text to a timer function?

If I just pass the variable I get "warning 213: tag mismatch". But it's working.


Example:
Code:
SomeFunction()
{
    new File:myFile = fopen("myfile.txt", io_read);
    if (myFile)
    {
        SetTimerEx("MyTimer", 10000, false, "d", myFile);// Compiler throws "warning 213: tag mismatch"
    }
}

forward MyTimer(File:file);
public MyTimer(File:file)
{
    // do something with the file handle
}
How can I get rid of this warning?
Reply


Messages In This Thread
Pass variables of types like File or Text to timer function? - by Programie - 01.05.2012, 19:15
Re: Pass variables of types like File or Text to timer function? - by Kar - 01.05.2012, 19:17
Re: Pass variables of types like File or Text to timer function? - by Finn - 01.05.2012, 19:18
Re: Pass variables of types like File or Text to timer function? - by Passout - 01.05.2012, 19:18
Re: Pass variables of types like File or Text to timer function? - by Programie - 01.05.2012, 20:17

Forum Jump:


Users browsing this thread: 1 Guest(s)