..\Stocks\Functions;Stocks;.pwn(241) : error 012: invalid function call, not a valid address
..\Stocks\Functions;Stocks;.pwn(241) : warning 215: expression has no effect
..\Stocks\Functions;Stocks;.pwn(241) : warning 215: expression has no effect
..\Stocks\Functions;Stocks;.pwn(241) : warning 215: expression has no effect
..\Stocks\Functions;Stocks;.pwn(241) : warning 215: expression has no effect
..\Stocks\Functions;Stocks;.pwn(241) : warning 215: expression has no effect
..\Stocks\Functions;Stocks;.pwn(241) : error 001: expected token: ";", but found ")"
..\Stocks\Functions;Stocks;.pwn(241) : error 029: invalid expression, assumed zero
..\Stocks\Functions;Stocks;.pwn(241) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
stock SaveAdminAction(playerid, format[], va_args<>)
{
new
out[256],
out2[256],
File:Log = fopen(AActionsLog, io_append)
;
va_format(out, sizeof(out), format, va_start<2>);
/*241*/format(out2, sizeof(out2), "Date: %s Player: %s ID: %d Level: %d Action: %s", GetDate(), GetName(playerid), playerid, GetPlayerLevel(playerid), out);
if(Log)
{
fwrite(File:Log, out2);
fclose(File:Log);
}
}
format(out2, sizeof(out2), "Date: %s Player: %s ID: %d Level: %d Action: %s", GetDate(), GetName(playerid), playerid, GetPlayerLevel(playerid), out);
That usually happens when you try to call a variable as a function (did you do "X(Y)" instead of "X[Y]").
I can't see it as being anything to do with y_va given that it's not on the same line. |
stock SaveAdminAction(playerid, format[], va_args<>)
{
new
out[256],
out2[256],
File:Log = fopen(AActionsLog, io_append)
;
va_format(out, sizeof(out), format, va_start<2>);
format(out2, sizeof(out2), " ", 0);
if(Log)
{
fwrite(File:Log, out2);
fclose(File:Log);
}
}
Maybe GetName(playerid) suppost to be a GetName[playerid], dunno if you got it as a function or variable but check.
@UP: Was posting when ur post wasn't there :P |
stock SaveAdminAction(playerid, format[], va_args<>)
{
new
out[256],
File:Log = fopen(AActionsLog, io_append)
;
va_format(out, sizeof(out), format, va_start<2>);
if(Log)
{
fwrite(File:Log, TempFunc(playerid, out));
fclose(File:Log);
}
}
stock TempFunc(playerid, action[])
{
new Str[256];
format(Str, 256, "Date: %s Player: %s ID: %d Level: %d Action: %s", GetDate(), GetName(playerid), playerid, GetPlayerLevel(playerid), action);
return Str;
}
No idea, my only guess is that somehow using a function and local both called "format" is the problem, but I'm not sure how that could be.
|