SA-MP Forums Archive
[HELP] error 035: argument type mismatch (argument 1) - 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: [HELP] error 035: argument type mismatch (argument 1) (/showthread.php?tid=575269)



[HELP] error 035: argument type mismatch (argument 1) - rolex - 25.05.2015

Hi Guys, i'm try'in to learn pawn, i've one rp script, but when i try'd to make a fuelmeter, i got this problem. Can be solved?

Код:
(5612) : error 033: array must be indexed (variable "fuelmeter")
(5613) : error 035: argument type mismatch (argument 1)
(5614) : error 035: argument type mismatch (argument 1)
(5615) : error 035: argument type mismatch (argument 1)
(5616) : error 035: argument type mismatch (argument 1)
(5617) : error 035: argument type mismatch (argument 1)
(5618) : error 035: argument type mismatch (argument 1)
(5619) : error 035: argument type mismatch (argument 1)
(5620) : error 035: argument type mismatch (argument 1)
(5623) : error 033: array must be indexed (variable "speedometer")
(5624) : error 035: argument type mismatch (argument 1)
(5625) : error 035: argument type mismatch (argument 1)
(5626) : error 035: argument type mismatch (argument 1)
(5627) : error 035: argument type mismatch (argument 1)
(5628) : error 035: argument type mismatch (argument 1)
(5629) : error 035: argument type mismatch (argument 1)
(5630) : error 035: argument type mismatch (argument 1)
(5631) : error 035: argument type mismatch (argument 1)
Defines:
Код:
new Text:speedometer[MAX_PLAYERS];

new Text:fuelmeter[MAX_PLAYERS];
Lines:
Код:
	// Fuelmeter
	fuelmeter = TextDrawCreate(200.000000, 432.000000, "Gasolina:");
	TextDrawBackgroundColor(fuelmeter, 255);
	TextDrawFont(fuelmeter, 3);
	TextDrawLetterSize(fuelmeter, 0.500000, 1.000000);
	TextDrawColor(fuelmeter, 16777215);
	TextDrawSetOutline(fuelmeter, 0);
	TextDrawSetProportional(fuelmeter, 1);
	TextDrawSetShadow(fuelmeter, 1);
	TextDrawSetSelectable(fuelmeter, 0);

	// Speedometer
	speedometer = TextDrawCreate(380.000000, 432.000000, "KM:");
	TextDrawBackgroundColor(speedometer, 255);
	TextDrawFont(speedometer, 3);
	TextDrawLetterSize(speedometer, 0.500000, 1.000000);
	TextDrawColor(speedometer, 16777215);
	TextDrawSetOutline(speedometer, 0);
	TextDrawSetProportional(speedometer, 1);
	TextDrawSetShadow(speedometer, 1);
	TextDrawSetSelectable(speedometer, 0);



Re: [HELP] error 035: argument type mismatch (argument 1) - Konstantinos - 25.05.2015

You declared them as arrays but you don't use them as arrays as well. That would be fuelmeter[playerid] but it's recommended to use player-textdraws.


Re: [HELP] error 035: argument type mismatch (argument 1) - rolex - 25.05.2015

Ok, but, how can i correctly use as playertextdraw? can you make a example?


Re: [HELP] error 035: argument type mismatch (argument 1) - Konstantinos - 25.05.2015

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw

- Change the tag of the variable when you declare it.
- Change the functions' name.
- Add "playerid" as first parameter.


Re: [HELP] error 035: argument type mismatch (argument 1) - rolex - 25.05.2015

Thanks dude, i've solved that sh.. thanks!