Runtime error 5: Invalid Memory Access
#1

so, when I start my server with my own created Filterscript, this shows: [09:00:35] [debug] Run time error 5: "Invalid memory access"
[09:00:35] [debug] AMX backtrace:
[09:00:35] [debug] #0 00000288 in ?? (0x00000bbc, 0x00000000, 0x00000000, 0xc7afce00, 0x42af47b2, 0x43ab1148, 0x43af099c, 0xffffffff) from ropex.amx
[09:00:35] [debug] #1 00001a90 in public OnFilterScriptInit () from ropex.amx

code:
pawn Код:
public OnFilterScriptInit()
{
    TextDrawUseBox(blind,1);
    TextDrawBoxColor(blind,0x000000FF);
    TextDrawTextSize(blind,641.000000,10.000000);
    TextDrawAlignment(blind,0);
    TextDrawBackgroundColor(blind,0x00000000);
    TextDrawFont(blind,3);
    TextDrawLetterSize(blind,1.000000,51.000000);
    TextDrawColor(blind,0x000000AA);
    TextDrawSetOutline(blind,1);
    TextDrawSetProportional(blind,1);
    TextDrawSetShadow(blind,1);
    print("\n--------------------------------------");
    print(" Rope System");
    print("--------------------------------------\n");
    for(new p=0; p<howmanyropes; p++)
    {
        for(new i=0; i<ropelength; i++)
        { //alte model id = 338
            seile[i][p] = b_CreateObject(3004,0,0,-90000-i,87.640026855469,342.13500976563, 350.07507324219);
        }
    }
    return 1;
}
please help
Reply
#2

Show the variables or arrays you made and the source for b_CreateObject.
Reply
#3

pawn Код:
//Easy Edit Section
#define howmanyropes 500 // Do Not Change Anything
#define zcatchtimer 1200 //in ms, time to calculate height
#define r_maxping 1000 //highest ping of sliding units, dont set too high, or death-bugs will increase
#define falltime 25 //low = the best, but beware of server weakness (25 isnt incredible high, think, that you slide around 2-5 secs)
#define ropelength 100 //in meter, after what amount of meters you start falling (and rope ends)... Increasing will take server power and realism
#define abfangen 6 //at what height above ground should player get stopped ?

//          DO NOT EDIT BELOW, IF YOU DO NOT KNOW, WHATS IT !

new Float:tempx[MAX_PLAYERS],Float:tempy[MAX_PLAYERS],Float:tempz[MAX_PLAYERS],Float:tempa[MAX_PLAYERS];
new Float:lowz[MAX_PLAYERS],vworld[MAX_PLAYERS],chopper[MAX_PLAYERS];
new Float:tx[MAX_PLAYERS],Float:ty[MAX_PLAYERS],Float:tz[MAX_PLAYERS],Text:blind;
new Float:helix[MAX_PLAYERS],Float:heliy[MAX_PLAYERS],Float:heliz[MAX_PLAYERS];
new seile[9999][MAX_PLAYERS],issliding[MAX_PLAYERS],tempplayerid[MAX_PLAYERS],notstarted[MAX_PLAYERS];
And actually b_CreateObject is from an include:
pawn Код:
#include <bfx_objects>
Include code:

pawn Код:
#define MAX_OBJEKTE 5000
#define DISTANZ 142
#define VERSIONA "v3.3 BETA"
#define MAX_AREA_OBJEKTE 250
#define IsPosInDistance(%0,%1,%2,%3,%4,%5,%6) \
        (((%0 - %3) * (%0 - %3)) + ((%1 - %4) * (%1 - %4)) + ((%2 - %5) * (%2 - %5)) <= %6 * %6)
new PLAYER_OBJEKTE[MAX_PLAYERS];
//------------------------------------------------------------------------------
enum objects
{
    modelu,
    Float:x_val,
    Float:y_val,
    Float:z_val,
    Float:rx_val,
    Float:ry_val,
    Float:rz_val,
    exist,
    obj_id,
    virtual_world_object,
}
new Objekte[MAX_OBJEKTE][objects];
new bool:CreatedObjekte[MAX_PLAYERS][MAX_OBJEKTE];
new CreatedID[MAX_PLAYERS][MAX_OBJEKTE];
//new Streamer;
new now_idx;
new Float:pttx[MAX_PLAYERS],Float:ptty[MAX_PLAYERS],Float:pttz[MAX_PLAYERS];
pawn Код:
stock b_CreateObject(modelid,Float:xx,Float:yy,Float:zz,Float:rxx,Float:ryy,Float:rzz,virtual_ww = -1)
{
now_idx++;
Objekte[now_idx][modelu] = modelid;
Objekte[now_idx][x_val] = Float:xx;
Objekte[now_idx][y_val] = Float:yy;
Objekte[now_idx][z_val] = Float:zz;
Objekte[now_idx][rx_val] = Float:rxx;
Objekte[now_idx][ry_val] = Float:ryy;
Objekte[now_idx][rz_val] = Float:rzz;
Objekte[now_idx][exist] = 1;
Objekte[now_idx][obj_id] = now_idx;
Objekte[now_idx][virtual_world_object] = virtual_ww;
return now_idx;
}
Reply
#4

First you should not practice bad arrays.

The array sizes are completely BAD.

pawn Код:
seile[9999][MAX_PLAYERS]
Instead:
pawn Код:
seile[ropelength][howmanyropes]
Reply
#5

Still appears
Reply
#6

Quote:
Originally Posted by Youssef221
Посмотреть сообщение
pawn Код:
//Easy Edit Section
#define howmanyropes 500 // Do Not Change Anything
#define zcatchtimer 1200 //in ms, time to calculate height
#define r_maxping 1000 //highest ping of sliding units, dont set too high, or death-bugs will increase
#define falltime 25 //low = the best, but beware of server weakness (25 isnt incredible high, think, that you slide around 2-5 secs)
#define ropelength 100 //in meter, after what amount of meters you start falling (and rope ends)... Increasing will take server power and realism
#define abfangen 6 //at what height above ground should player get stopped ?

//          DO NOT EDIT BELOW, IF YOU DO NOT KNOW, WHATS IT !

new Float:tempx[MAX_PLAYERS],Float:tempy[MAX_PLAYERS],Float:tempz[MAX_PLAYERS],Float:tempa[MAX_PLAYERS];
new Float:lowz[MAX_PLAYERS],vworld[MAX_PLAYERS],chopper[MAX_PLAYERS];
new Float:tx[MAX_PLAYERS],Float:ty[MAX_PLAYERS],Float:tz[MAX_PLAYERS],Text:blind;
new Float:helix[MAX_PLAYERS],Float:heliy[MAX_PLAYERS],Float:heliz[MAX_PLAYERS];
new seile[9999][MAX_PLAYERS],issliding[MAX_PLAYERS],tempplayerid[MAX_PLAYERS],notstarted[MAX_PLAYERS];
And actually b_CreateObject is from an include:
pawn Код:
#include <bfx_objects>
Include code:

pawn Код:
#define MAX_OBJEKTE 5000
#define DISTANZ 142
#define VERSIONA "v3.3 BETA"
#define MAX_AREA_OBJEKTE 250
#define IsPosInDistance(%0,%1,%2,%3,%4,%5,%6) \
        (((%0 - %3) * (%0 - %3)) + ((%1 - %4) * (%1 - %4)) + ((%2 - %5) * (%2 - %5)) <= %6 * %6)
new PLAYER_OBJEKTE[MAX_PLAYERS];
//------------------------------------------------------------------------------
enum objects
{
    modelu,
    Float:x_val,
    Float:y_val,
    Float:z_val,
    Float:rx_val,
    Float:ry_val,
    Float:rz_val,
    exist,
    obj_id,
    virtual_world_object,
}
new Objekte[MAX_OBJEKTE][objects];
new bool:CreatedObjekte[MAX_PLAYERS][MAX_OBJEKTE];
new CreatedID[MAX_PLAYERS][MAX_OBJEKTE];
//new Streamer;
new now_idx;
new Float:pttx[MAX_PLAYERS],Float:ptty[MAX_PLAYERS],Float:pttz[MAX_PLAYERS];
pawn Код:
stock b_CreateObject(modelid,Float:xx,Float:yy,Float:zz,Float:rxx,Float:ryy,Float:rzz,virtual_ww = -1)
{
now_idx++;
Objekte[now_idx][modelu] = modelid;
Objekte[now_idx][x_val] = Float:xx;
Objekte[now_idx][y_val] = Float:yy;
Objekte[now_idx][z_val] = Float:zz;
Objekte[now_idx][rx_val] = Float:rxx;
Objekte[now_idx][ry_val] = Float:ryy;
Objekte[now_idx][rz_val] = Float:rzz;
Objekte[now_idx][exist] = 1;
Objekte[now_idx][obj_id] = now_idx;
Objekte[now_idx][virtual_world_object] = virtual_ww;
return now_idx;
}
Here:
pawn Код:
stock b_CreateObject(modelid,Float:xx,Float:yy,Float:zz,Float:rxx,Float:ryy,Float:rzz,virtual_ww = -1)
{
now_idx++;
Objekte[now_idx][modelu] = modelid;
Objekte[now_idx][x_val] = xx;
Objekte[now_idx][y_val] = yy;
Objekte[now_idx][z_val] = zz;
Objekte[now_idx][rx_val] = rxx;
Objekte[now_idx][ry_val] = ryy;
Objekte[now_idx][rz_val] = rzz;
Objekte[now_idx][exist] = 1;
Objekte[now_idx][obj_id] = now_idx;
Objekte[now_idx][virtual_world_object] = virtual_ww;
return now_idx;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)