/factionadvertise Command - 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: /factionadvertise Command (
/showthread.php?tid=194876)
/factionadvertise Command -
Bates - 30.11.2010
Hello. I've made a /factionad command, everything works except the string. I got a function, "GetPlayerFactionName", and i'm sure it's working.
pawn Код:
format(string, sizeof(string), "Advertisement: %s [%s]", result, GetPlayerFactionName);
I get a error, it says error 076: syntax error in the expression, or invalid function call. I know it probably shouldn't say GetPlayerFactionName, but what shall i write instead?
Thanks in advance.
Bates
Re: /factionadvertise Command -
alpha500delta - 30.11.2010
GetPlayerFactionName is not a standard SA:MP function.
Have you created a function for it?
If not, add something like
pawn Код:
forward GetPlayerFactionName(playerid);
GetPlayerFactionName(playerid);
{
Add shit
return 1;
}
If you did add it, check if you added "new string[number_here];" and shit
Also, can you show the whole command please?
Edit: I've had this error to, but I dont know how I fixed it...lol
Re: /factionadvertise Command -
Hiitch - 30.11.2010
If there is a parameter in GetPlayerFactionName, like playerid, you need to do:
pawn Код:
format(string, sizeof(string), "Advertisement: %s [%s]", result, GetPlayerFactionName(playerid));
instead of what you did before. I'm not sure if this will work, but good luck.
Re: /factionadvertise Command -
Bates - 30.11.2010
Quote:
Originally Posted by Hiitch
If there is a parameter in GetPlayerFactionName, like playerid, you need to do:
pawn Код:
format(string, sizeof(string), "Advertisement: %s [%s]", result, GetPlayerFactionName(playerid));
instead of what you did before. I'm not sure if this will work, but good luck.
|
Thanks! It worked.
Thanks again!
Re: /factionadvertise Command -
Hiitch - 30.11.2010
Quote:
Originally Posted by Bates
Thanks! It worked.
Thanks again!
|
No problem sir. Glad I could help.