SA-MP Forums Archive
Whats wrong here? - 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: Whats wrong here? (/showthread.php?tid=93309)



Whats wrong here? - Puzi - 24.08.2009

Hey there,

I tried to make a little solving with this. I have made this command and it works, but only for one person. When he types it, he can see the message, but others cannot. I tried changing SendClientMessage to SendClientMessageToAll but I get errors Here is the command...

Код:
   if(strcmp(cmdtext, "/needbus", true) == 0) {
	   new pname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, pname, sizeof (pname));
     format(stringw, sizeof(stringw), "*** %s [id: %d] needs a bus / potrzebuje autobus!", pname, giveplayerid);
     SendClientMessageToAll(playerid, COLOR_ADMIN, stringw); //
  return 1;}
...And errors...

Код:
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(3923) : error 035: argument type mismatch (argument 2)
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(4114) : warning 203: symbol is never used: "IsNumeric"
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(4114) : warning 203: symbol is never used: "ReturnUser"

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
P.S - Don't worry about my warnings

Thanks And Regards
Puzi


Re: Whats wrong here? - woot - 24.08.2009

SendClientMessageToAll(playerid, COLOR_ADMIN, stringw);
"ToAll" "playerid" makes no sense, so ..
pawn Код:
SendClientMessageToAll(COLOR_ADMIN, stringw);
PS: use
pawn Код:
#pragma unused IsNumeric
#pragma unused ReturnUser
to prevent the warnings.


Re: Whats wrong here? - MenaceX^ - 24.08.2009

How could SendClientMessageToAll be for a playerid..? Think before changing codes.
pawn Код:
SendClientMessageToAll(COLOR_ADMIN, stringw);



Re: Whats wrong here? - Puzi - 24.08.2009

Ah thank you very much guys