Problem!!
#1

PHP код:
error 035argument type mismatch (argument 1
I have 26 of those

This is the line
PHP код:
UpisiLog(LOG_REGISTERstring); 
This is for saving logs. What is the problem??
Reply
#2

Show the function, your first argument LOG_REGISTER isn't matching it's type. You probably have it as an integer in the function but you're trying to pass a string in it.
Reply
#3

PHP код:
stock UpisiLog(fajl[], string[])
{
    new 
unos[256];
    new 
satminutsekunddanmesecgodina;
    
gettime(satminutsekund);
    
getdate(godinamesecdan);
    
format(unos256"[%d/%d/%d - %d:%d:%d] %s\r\n"danmesecgodinasatminutsekundstring);
    new 
File:hFile;
    
hFile fopen(fajlio_append);
    
fwrite(hFileunos);
    
fclose(hFile);
    return 
1;

That is UpisiLog (WriteLog) function. What do you need??
Reply
#4

When you ask for help and it's about a non-native function, post the function.

EDIT: Show your definition of LOG_REGISTER.
Reply
#5

PHP код:
#define LOG_REGISTER                    "Logovi/Registracija.txt" 
Reply
#6

Show us how you used upisilog!
Reply
#7

When player register on server it create string and string is sent to admins and it should be saved to log Registracija.txt.
Reply
#8

im not confirmed but just try it.
Код:
stock UpisiLog(fajl[],LOG_REGISTER[], string[])
{
    new unos[256];
    new sat, minut, sekund, dan, mesec, godina;
    gettime(sat, minut, sekund);
    getdate(godina, mesec, dan);
    format(unos, 256, "[%d/%d/%d - %d:%d:%d] %s\r\n", dan, mesec, godina, sat, minut, sekund, string);
    new File:hFile;
    hFile = fopen(fajl, io_append);
    fwrite(hFile, unos);
    fclose(hFile);
    return 1;
}
Reply
#9

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
im not confirmed but just try it.
Код:
stock UpisiLog(fajl[],LOG_REGISTER[], string[])
{
    new unos[256];
    new sat, minut, sekund, dan, mesec, godina;
    gettime(sat, minut, sekund);
    getdate(godina, mesec, dan);
    format(unos, 256, "[%d/%d/%d - %d:%d:%d] %s\r\n", dan, mesec, godina, sat, minut, sekund, string);
    new File:hFile;
    hFile = fopen(fajl, io_append);
    fwrite(hFile, unos);
    fclose(hFile);
    return 1;
}
Nope it won't work because UpisiLog(WriteLog) is not only for register. it is for login, anti-cheat, kick...
Reply
#10

Your function and your define should be working fine.
Are you using your function with another file path? Is it working?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)