Getting some error while compiling ?? - 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)
+--- Thread: Getting some error while compiling ?? (
/showthread.php?tid=506009)
Getting some error while compiling ?? -
Laure - 11.04.2014
Hey there i get an error which is unknown to me so that i need help of you guys.
pawn Код:
public OnPlayerCommandPerformed(playerid, success)
{
new string[128];
format(string, sizeof(string), "[cmd] [%s]: %s", SenderName, result); // this line is buggy.
print(string);
if(!success)
{
SendClientMessage(playerid, COLOR_GREY, "** Sorry you have entered a command that doesnt exist.");
}
return 1;
}
It says invalid function call i have marked the line where i get error.
Re: Getting some error while compiling ?? -
Scottas - 11.04.2014
I guess, that 'SenderName' is not a variable, but functions name.
Re: Getting some error while compiling ?? -
Equuuuin0X - 11.04.2014
try to change SenderName to GetPlayerName ?
Re: Getting some error while compiling ?? -
Laure - 11.04.2014
No dude i have explained GetPlayerName as SenderName in my stock so that shouldnt be the reason any idea?
Re: Getting some error while compiling ?? -
Hanuman - 11.04.2014
and what is "result"? any stock?
Re: Getting some error while compiling ?? -
Laure - 11.04.2014
no stock for result
lol
Re: Getting some error while compiling ?? -
Hanuman - 11.04.2014
Then what is it(result)?
Re: Getting some error while compiling ?? -
Bingo - 11.04.2014
pawn Код:
stock Name(playerid)
{
new string[72];
GetPlayerName(playerid, string, sizeof(string));
return string;
}
Use name instead of sendername.
Re: Getting some error while compiling ?? -
Konstantinos - 11.04.2014
If SenderName is stock, use opened/closed parentheses and its parameters (if it has any). Otherwise it will try to call an invalid function like the error says.
Re: Getting some error while compiling ?? -
Laure - 11.04.2014
fixed it anyhow thanks guys