Jump to content

Problema pluginuri


Gabi.

Recommended Posts

Am o problema, in functie de versiunea streamer-ului imi arata diferite erori. De exemplu eroarea asta in consola si imi da mod Unknown:

 

21:59:31] [debug] Run time error 4: "Array index out of bounds"

[21:59:31] [debug]  Accessing element at index 100 past array upper bound 99

[21:59:31] [debug] AMX backtrace:

[21:59:31] [debug] #0 002852d8 in public LoadProperty () from gmm.amx

[21:59:31] [debug] #1 000a4e24 in ?? () from gmm.amx

[21:59:31] [debug] #2 00028438 in public L_AFK_OnGM () from gmm.amx

[21:59:31] [debug] #3 native CallLocalFunction () from samp03svr

[21:59:31] [debug] #4 00018978 in public SSCANF_OnGameModeInit () from gmm.amx

[21:59:31] [debug] #5 00012d28 in public Itter_OnGameModeInit () from gmm.amx

[21:59:31] [debug] #6 native CallLocalFunction () from samp03svr

[21:59:31] [debug] #7 00011e4c in public ScriptInit_OnGameModeInit () from gmm.amx

[21:59:31] [debug] #8 00010dd0 in public PZone_OnGameModeInit () from gmm.amx

[21:59:31] [debug] #9 native CallLocalFunction () from samp03svr

[21:59:31] [debug] #10 00006a34 in public OnGameModeInit () from gmm.amx

 

 

 

Link to comment
Share on other sites

function LoadProperty() {
    new result[100],index = 0;
    mysql_query(SQL,"SELECT * FROM `houses` ORDER BY `houses`.`ID` ASC");
    mysql_store_result();
    while(mysql_retrieve_row()) {
        housess++;
        index++;
        new i = index;

        mysql_get_field("ID", result);                HouseInfo[hID] = strval(result);
           mysql_get_field("Entrancex", result);        HouseInfo[hEntrancex] = floatstr(result);
        mysql_get_field("Entrancey", result);        HouseInfo[hEntrancey] = floatstr(result);
        mysql_get_field("Entrancez", result);        HouseInfo[hEntrancez] = floatstr(result);
        mysql_get_field("Exitx", result);            HouseInfo[hExitx] = floatstr(result);
        mysql_get_field("Exity", result);            HouseInfo[hExity] = floatstr(result);
        mysql_get_field("Exitz", result);            HouseInfo[hExitz] = floatstr(result);
        mysql_get_field("Owner", result);            strmid(HouseInfo[hOwner], result, 0, 32, 32);
        mysql_get_field("Discription", result);        strmid(HouseInfo[hDiscription], result, 0, 24, 24);
        mysql_get_field("Value", result);            HouseInfo[hValue] = strval(result);
        mysql_get_field("Hel", result);                HouseInfo[hHel] = strval(result);
        mysql_get_field("Arm", result);                HouseInfo[hArm] = strval(result);
        mysql_get_field("Interior", result);        HouseInfo[hInterior] = strval(result);
        mysql_get_field("Lockk", result);            HouseInfo[hLock] = strval(result);
        mysql_get_field("Owned", result);            HouseInfo[hOwned] = strval(result);
        mysql_get_field("Rent", result);            HouseInfo[hRent] = strval(result);
        mysql_get_field("Rentabil", result);        HouseInfo[hRentabil] = strval(result);
        mysql_get_field("Takings", result);            HouseInfo[hTakings] = strval(result);
        mysql_get_field("Level", result);            HouseInfo[hLevel] = strval(result);
        mysql_get_field("Virtual", result);            HouseInfo[hVirtual] = strval(result);
        mysql_get_field("Radio", result);            HouseInfo[hRadio] = strval(result);        
            
        UpdateLabel(1,HouseInfo[hID]);    
    }
    mysql_free_result();
    printf("Houses: %d", index);
    return 1;
}

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.