error 048: array dimensions do not match - 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: error 048: array dimensions do not match (
/showthread.php?tid=541687)
error 048: array dimensions do not match -
weedxd - 13.10.2014
SO i basicly dont understand wth is the problem with mSelection I fixed the errors before but now this :/
PHP код:
(4157) : error 048: array dimensions do not match
PHP код:
ShowPlayerModelPreviews(playerid)
{
new x=0;
new Float:BaseX = DIALOG_BASE_X;
new Float:BaseY = DIALOG_BASE_Y - (SPRITE_DIM_Y * 0.33); // down a bit
new linetracker = 0;
new itemat = GetPVarInt(playerid, "vspawner_page") * SELECTION_ITEMS;
/*ThisLine*/ new amount = strval(gItemList);
// 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;
}
gSelectionItems[playerid][x] = CreateModelPreviewTextDraw(playerid, amount, BaseX, BaseY, SPRITE_DIM_X, SPRITE_DIM_Y);
gSelectionItemsTag[playerid][x] = amount;
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: error 048: array dimensions do not match -
Rudy_ - 13.10.2014
new amount = strval(gItemList);
Show me the enum where you stored it
Re: error 048: array dimensions do not match -
weedxd - 13.10.2014
Well i will be honest i dunno how to create an enum so thats the reason why i need your help :/
Basicly "amount" should give vehicle model list to mSelection but i dunno how to do that... Im sorry :/
Re: error 048: array dimensions do not match -
Stinged - 13.10.2014
What's gItemList?
Re: error 048: array dimensions do not match -
weedxd - 13.10.2014
It should be in mSelection and it should give the ids of vehicles.But as you might see it doesen't.
Re: error 048: array dimensions do not match -
weedxd - 13.10.2014
FIXED IT: I didn't have "vehicles.txt" file with car ids and i had to use "vehlist" incase of "gItemList" and i had to define it new "vehlist = mS_INVALID_LISTID;".
I feel so stupid somtimes... I can do it myself but i request help :/