Help with Error. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Error. (
/showthread.php?tid=158624)
Help with Error. -
[Sk]Noob - 10.07.2010
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);
}
Re: Help with Error. -
DeathOnaStick - 10.07.2010
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.
Re: Help with Error. -
Dennis - 10.07.2010
Try changing playa to player? Or playerid?
PlayerJailLog(string,player);
or
PlayerJailLog(string,playerid);
Re: Help with Error. -
DeathOnaStick - 10.07.2010
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.
Re: Help with Error. -
Hiddos - 10.07.2010
Make sure you're doing "string[]" on the declaration, not just "string"