SA-MP Forums Archive
Type mismatch - 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: Type mismatch (/showthread.php?tid=67175)



Type mismatch - GTA_Rules - 27.02.2009

Hi,

I'm sorry but again, I'm stuck. All my other IRC commands work. I tried different things but I can find where I'm wrong .
I just started read lang.pdf yesterday so I don't know what typemismatch means yet .

http://pastebin.com/m46931a49

Could somebody help me please.

Take care! :w


Re: Type mismatch - samgreen - 27.02.2009

Which line is 791?
What IRC Plugin are you using?
What architecture is the server? Windows, Linux?


Re: Type mismatch - zyx - 27.02.2009

I'm thinking it's line #9 from the pastebin code. Try changing the return IrcSay... line to this: return IrcSay("IRC_AUTH_MSG");


Re: Type mismatch - GTA_Rules - 27.02.2009

Oops sorry, forgot to say that

Код:
		GameTextForPlayer(tString,5000,5);
My host uses Linux, and I use Jacob's IRC plugin. (everything else works)


Re: Type mismatch - zyx - 27.02.2009

Oh, ignore my first post please. Change that line to GameTextForPlayer(playerid,tString,5000,5);



Re: Type mismatch - samgreen - 27.02.2009

Quote:
Originally Posted by zyx
Oh, ignore my first post please. Change that line to GameTextForPlayer(playerid,tString,5000,5);
That would be perfect if this were a standard dcmd command. Unfortunately irccmd's do not pass the playerid as a parameter.


Re: Type mismatch - zyx - 27.02.2009

Seems to me that he wants to send the message to all connected players in the server. In that case, he should use GameTextForAll(tString,5000,5);


Re: Type mismatch - GTA_Rules - 27.02.2009

So how can I fix this? I'm sorry, I tried looking up already, and I'm reading lang.pdf as I'm speaking. So please don't think I'm abusing your help

EDIT: Nevermind it worked thanks to the post above! Thank you very much! I really appreciate it


Re: Type mismatch - zyx - 27.02.2009

Change the GameTextForPlayer(...); to GameTextForAll(tString,5000,5);. GameTextForPlayer sends the message to only 1 player or more if you're using a loop, hence you need the playerid in the beginning of it. If you want to send the GameText to every player in the server, you use GameTextForAll(...);

Edit: You're welcome.