SA-MP Forums Archive
Textdrawsetstring Gives An error? - 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: Textdrawsetstring Gives An error? (/showthread.php?tid=130815)



Textdrawsetstring Gives An error? - rensfromrpas - 28.02.2010

Hi, i haven't scripted in a while now, and started over again, but i ran onto this error:

Код:
C:\Users\XXXXXX\Desktop\SA-MP SERV\gamemodes\RP.pwn(417) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
i've handled before with this error i belive, but i can't remember ;<

this is the line:
Код:
	TextDrawSetString(SrvMSG, text);
I've allready tried formatting the text as the following:
Код:
	new string2[256];
	format(string2, sizeof(string2), "%s", text);
	TextDrawSetString(SrvMSG, string2);
	TextDrawShowForAll(SrvMSG);
but is giving errors:

Код:
C:\Users\XXXXXX\Desktop\SA-MP SERV\gamemodes\RP.pwn(418) : error 029: invalid expression, assumed zero
C:\Users\XXXXXX\Desktop\SA-MP SERV\gamemodes\RP.pwn(418) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Textdrawsetstring Gives An error? - adsy - 28.02.2010

forward(string2, sizeof(string2), "%s", text);


maybe format??

format(string2, sizeof(string2), "%s", text);


Re: Textdrawsetstring Gives An error? - rensfromrpas - 28.02.2010

Quote:
Originally Posted by adsy
forward(string2, sizeof(string2), "%s", text);


maybe format??

format(string2, sizeof(string2), "%s", text);
sorry, yeah ment that :$ i was scripting and making that treath at the same time :$
it was format, editing


Re: Textdrawsetstring Gives An error? - rensfromrpas - 28.02.2010

bump


Re: Textdrawsetstring Gives An error? - rensfromrpas - 28.02.2010

no-one ;-[?


Re: Textdrawsetstring Gives An error? - Sergei - 28.02.2010

http://forum.sa-mp.com/index.php?topic=67900.0

Quote:
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.