Argument 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)
+--- Thread: Argument type mismatch (
/showthread.php?tid=555979)
Argument type mismatch -
weedxd - 09.01.2015
Well i fixed all the previous errors but i can't find a way how to do that with this one...
PHP код:
C:\Users\WeeD\Desktop\SAMP\gamemodes\HTLS-RP.pwn(4169) : error 035: argument type mismatch (argument 2)
C:\Users\WeeD\Desktop\SAMP\gamemodes\HTLS-RP.pwn(4170) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
PHP код:
// Destroy any previous ones created
DestroyPlayerModelPreviews(playerid);
while(x != SELECTION_ITEMS && itemat < gTotalItems) {
if(linetracker == 0) {
BaseX = DIALOG_BASE_X + 25.0; // in a bit from the box
BaseY += SPRITE_DIM_Y + 1.0; // move on the Y for the next line
}
>>> gSelectionItems[playerid][x] = CreateModelPreviewTextDraw(playerid, gItemList[itemat], BaseX, BaseY, SPRITE_DIM_X, SPRITE_DIM_Y);
>>> gSelectionItemsTag[playerid][x] = gItemList[itemat];
BaseX += SPRITE_DIM_X + 1.0; // move on the X for the next sprite
linetracker++;
if(linetracker == ITEMS_PER_LINE) linetracker = 0;
itemat++;
x++;
}
Re: Argument type mismatch -
weedxd - 09.01.2015
Well if anyone has the same problem here is a fix.
PHP код:
gSelectionItems[playerid][x] = CreateModelPreviewTextDraw(playerid, itemat, BaseX, BaseY, SPRITE_DIM_X, SPRITE_DIM_Y);
gSelectionItemsTag[playerid][x] = itemat;