Help with Error.
#1

C:\Users\Yaroslav\Desktop\SDRP\gamemodes\sdgc.pwn( 928 : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


This is the error..

This is the line: PlayerJailLog(string,playa);

And this is the public PlayerJailLog

forward PlayerJailLog(string[],name[]);
public PlayerJailLog(string[],name[])
{
new entry[256],str[256];
format(entry, sizeof(entry), "%s\n",string);
format(str,sizeof(str), "pLogs/%s.admin.log",name);
new File:hFile;
hFile = fopen(str, io_append);
fwrite(hFile, entry);
fclose(hFile);
}
Reply
#2

Quote:
Originally Posted by [Sk]Noob
Посмотреть сообщение
C:\Users\Yaroslav\Desktop\SDRP\gamemodes\sdgc.pwn( 928 : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


This is the error..

This is the line: PlayerJailLog(string,playa);

And this is the public PlayerJailLog

forward PlayerJailLog(string[],name[]);
public PlayerJailLog(string[],name[])
{
new entry[256],str[256];
format(entry, sizeof(entry), "%s\n",string);
format(str,sizeof(str), "pLogs/%s.admin.log",name);
new File:hFile;
hFile = fopen(str, io_append);
fwrite(hFile, entry);
fclose(hFile);
}
You used ur own function once in your script. The second argument (playa) is in this case not a string, so change it in your script, where you used the function, to a string to fix it.
Reply
#3

Try changing playa to player? Or playerid?

PlayerJailLog(string,player);

or

PlayerJailLog(string,playerid);
Reply
#4

Quote:
Originally Posted by Dennis
Посмотреть сообщение
Try changing playa to player? Or playerid?

PlayerJailLog(string,player);

or

PlayerJailLog(string,playerid);
Change it to a string, like you wrote it in the function-decleration.
Reply
#5

Make sure you're doing "string[]" on the declaration, not just "string"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)