error 048: array dimensions do not match
#1

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(
!= 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(playeridamountBaseXBaseYSPRITE_DIM_XSPRITE_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_LINElinetracker 0;
        
itemat++;
        
x++;
    }

Reply
#2

new amount = strval(gItemList);
Show me the enum where you stored it
Reply
#3

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 :/
Reply
#4

What's gItemList?
Reply
#5

It should be in mSelection and it should give the ids of vehicles.But as you might see it doesen't.
Reply
#6

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 :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)