TDE not working properly
#1

I just cant get it to work! I'm talking the TDe FS by adri1. I extracted everything from the package, including the .dll files. It started showing me this error: "MSVCR100.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support."

When I replaced the MSVCR100.dll file with the same one from System32, which was recommended on a site, there were no more errors. But when I used the command /tde, it changed my camera angle and said it's an unknown command. I checked the server log and found this:

Код:
[05:16:21] [debug] Run time error 4: "Array index out of bounds"
[05:16:21] [debug]  Accessing element at index 65535 past array upper bound 499
[05:16:21] [debug] AMX backtrace:
[05:16:21] [debug] #0 00006150 in ?? (3309604, 0, 1137606656, 3418728) from TDE.amx
[05:16:21] [debug] #1 000345bc in ?? () from TDE.amx
[05:16:21] [debug] #2 0000b834 in public OnPlayerCommandText (0, 3436028) from TDE.amx
I even tried deleting the MSVCR100.dll file but it gave me these same errors in the log. Btw, I just upgraded to Windows 10.

PS: Yes, I do have the Microsoft Visual C++ 2010 Redistributable Package installed.
Yes, all the plugins loaded successfully.
Yes, I did search before posting and found fuck all.
Reply
#2

Please provide code.
We can't help you, if we can't see the actual culprit.
Reply
#3

Code for what?
If you require the code for TDEditor by adri1 so you can see if there are any bugs in or not, ehhh... I wouldn't recommend that.
If you require my server log, then here it is:
Код:
A-MP Dedicated Server
----------------------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[05:15:45] 
[05:15:45] Server Plugins
[05:15:45] --------------
[05:15:45]  Loading plugin: crashdetect
[05:15:45]   CrashDetect v4.15.1 is OK.
[05:15:45]   Loaded.
[05:15:45]  Loading plugin: Whirlpool
[05:15:45]  
[05:15:45]  ==================
[05:15:45]  
[05:15:45]   Whirlpool loaded
[05:15:45]  
[05:15:45]  ==================
[05:15:45]  
[05:15:45]   Loaded.
[05:15:45]  Loading plugin: irc
[05:15:45] 

*** IRC Plugin v1.4.2 by Incognito loaded ***

[05:15:45]   Loaded.
[05:15:45]  Loading plugin: audio
[05:15:45] 

*** Audio Plugin v0.5 R2 by Incognito loaded ***

[05:15:45]   Loaded.
[05:15:45]  Loading plugin: streamer
[05:15:45] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[05:15:45]   Loaded.
[05:15:45]  Loading plugin: sscanf
[05:15:45] 

[05:15:45]  ===============================

[05:15:45]       sscanf plugin loaded.     

[05:15:45]          Version:  2.8.1        

[05:15:45]    © 2012 Alex "******" Cole  

[05:15:45]  ===============================

[05:15:45]   Loaded.
[05:15:45]  Loading plugin: TDE
[05:15:45] 
TDEditor Plugin loaded, thank you for using.

[05:15:45]   Loaded.
[05:15:45]  Loaded 7 plugins.

[05:15:45] 
[05:15:45] Filterscripts
[05:15:45] ---------------
[05:15:45]   Loading filterscript 'TDE.amx'...
[05:15:45]  
[05:15:45]  
[05:15:45]  
[05:15:45]  
[05:15:45] ___ __  __
[05:15:45]  | |  \|_  _|.|_ _  _		
[05:15:45]  | |__/|__(_|||_(_)|			
[05:15:45]  
[05:15:45] TDEditor V1.17 by adri1
[05:15:45] TDEditor loaded
[05:15:45]  
[05:15:45]   Loaded 1 filterscripts.

[05:15:45]  
[05:15:45]  
[05:15:45]  
[05:15:45]  ======================================= 
[05:15:45]  |                                     | 
[05:15:45]  |        YSI version 3.09.0684        | 
[05:15:45]  |        By Alex "******" Cole        | 
[05:15:45]  |                                     | 
[05:15:45]  ======================================= 
[05:15:45]  
[05:15:45]  
[05:15:45]  
[05:15:45] *** Audio Plugin: Started TCP server on port 7777
[05:15:45] 
 -SODA Admin system Configurations Successfully Loaded!
[05:15:45] 
 ____________________________________________________

[05:15:45] |**        San Andreas Gang Wars    **|

[05:15:45]               Version 0.8 'RedMustard'              

[05:15:45]  [ADMIN] Auto login         0
[05:15:45]  [ADMIN] Must register      0
[05:15:45]  [ADMIN] Detect pausers     1
[05:15:45]  [ADMIN] MaxPing            8000
[05:15:45]  [ADMIN] AntiSpam           1
[05:15:45]  [ADMIN] PM Dialog          0
[05:15:45]  [ADMIN] AntiWeaponHack     1
[05:15:45]  [ADMIN] MaxAdminLevel      6
[05:15:45]  [ADMIN] Anti Bad Words     1
[05:15:45]  [ADMIN] AntiBanEvade       1
[05:15:45]  [ADMIN] Anti Advertise     1
[05:15:45]  [ADMIN] AdminImmunity      1
[05:15:45]  [ADMIN] ShowPmstoAdmins    1
[05:15:45]  [ADMIN] ReadCommands       1
[05:15:45]  [ADMIN] AntiCheatBans      1
[05:15:45]  [ADMIN] Allow changename   1
[05:15:45]  [ADMIN] ForbiddenNamesKick 1
[05:15:45]  [ADMIN] PartNamesKick      1
[05:15:45] 
-- No Illegal Weapons Loaded! --

[05:15:45] 
-- No Forbidden nick names Loaded! --

[05:15:45] 
-- No Forbidden Part nicks Loaded! --

[05:15:45] 
-- No Bad words Loaded! --

[05:15:45] --No Teleports loaded!--
[05:15:46] Number of vehicle models: 62
[05:16:10] [connection] 127.0.0.1:53186 requests connection cookie.
[05:16:11] [connection] incoming connection: 127.0.0.1:53186 id: 0
[05:16:11] [join] Skate has joined the server (0:127.0.0.1)
[05:16:21] [debug] Run time error 4: "Array index out of bounds"
[05:16:21] [debug]  Accessing element at index 65535 past array upper bound 499
[05:16:21] [debug] AMX backtrace:
[05:16:21] [debug] #0 00006150 in ?? (3309604, 0, 1137606656, 3418728) from TDE.amx
[05:16:21] [debug] #1 000345bc in ?? () from TDE.amx
[05:16:21] [debug] #2 0000b834 in public OnPlayerCommandText (0, 3436028) from TDE.amx
[05:25:08] [part] Skate has left the server (0:1)
Reply
#4

Crash Detect reads the .amx file.
The code is in the .pwn file.
You've got a array out of bounds under OnPlayerCommandText.
Post your /tde Command.
Reply
#5

It's not a command/FS I made and I'm sure there are no problems with this command but here you go:
pawn Код:
if(!strcmp(cmdtext, "/tde", true, 4))
    {
        if(ProjectEditor == playerid)
        {
            if(strlen(cmdtext) >= 6)
            {
                if( (!strcmp(cmdtext[5], "ayuda", true)) || (!strcmp(cmdtext[5], "help", true))  )
                {
                    SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}/tde box - /tde exit - /tde cursor - /tde select.");
                    return 1;
                }
                if( (!strcmp(cmdtext[5], "cursor", true)) )
                {
                    if(MouseCursor)
                    {
                        MouseCursor = false;
                        CancelSelectTextDraw(ProjectEditor);
                    }
                    else
                    {
                        MouseCursor = true;
                        SelectTextDraw(ProjectEditor, -1);
                    }
                    return 1;
                }
                if( (!strcmp(cmdtext[5], "select", true)) )
                {
                    SendClientMessage(playerid, -1, " ");
                    SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}Use /tde selectall to un/select all textdraws.");
                    SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}Use /tde edit  to edit selected textdraws.");
                    CancelSelectTextDraw(playerid);
                    IsPSel = false;
                    ShowSelectTDManage(playerid);
                    return 1;
                }
                if( (!strcmp(cmdtext[5], "selectall", true)) )
                {

                    if(selectall)
                    {
                        selectall = false;
                        Loop(0, MAX_PROJECT_TEXTDRAWS) SelectedTextDraws[c] = false;
                        SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}All textdraws unselected.");
                    }
                    else
                    {
                        selectall = true;
                        Loop(0, MAX_PROJECT_TEXTDRAWS) SelectedTextDraws[c] = true;
                        SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}All textdraws selected.");
                    }
                    return 1;
                }
                if( (!strcmp(cmdtext[5], "edit", true)) )
                {
                    if(moveselectedtds)
                    {
                        moveselectedtds = false;
                        SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}Edit selected textdraws: OFF.");
                    }
                    else
                    {
                        moveselectedtds = true;
                        SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}Edit selected textdraws: ON.");
                    }
                    return 1;
                }
                if( (!strcmp(cmdtext[5], "salir", true)) || (!strcmp(cmdtext[5], "exit", true))  )
                {
                    KillTimer(EditorUpdateTimer);
                    KillTimer(DeleteTimer);
                    KillTimer(SpeedTimer);
                    KillTimer(MoveTDTimer); MoveTDTimer = -1;
                    KillTimer(TDEHTimer); TDEHTimer = -1;
                    KillTimer(OutlineTimer);
                    KillTimer(ShadowTimer);
                    KillTimer(LetterSizeTimer); LetterSizeTimer = -1;
                    KillTimer(LetterTimer);
                    KillTimer(EditSizeTDTimer); EditSizeTDTimer = -1;
                    KillTimer(EditSizeSpeedT);
                    KillTimer(ShadowTimer);

                    if(strlen(ProjectFile))
                    {
                        SaveProject();
                        for (new i = 0; i < MAX_PROJECT_TEXTDRAWS; i++) RemoveTextDrawTDEOnly(i);
                    }
                   
                    Loop(0, MAX_PROJECT_TEXTDRAWS) SelectedTextDraws[c] = false;
                    moveselectedtds = false;
                    selectall = false;

                    DestroyMenuTextDraws();
                    EditMode = EDITMODE_NONE;
                    ColorMode = COLORMODE_NONE;
                    ProjectEditor = -1;
                    EditorEnabled = false;
                    IsPSel = true;
                    CursorOX = 0;
                    CursorOY = 0;
                    CursorX = 0;
                    CursorY = 0;
                    ScreenWidth = 0;
                    ScreenHeight = 0;
                    OffsetZ = 415.0;
                    EditIndex = INVALID_INDEX_ID;
                    EditMoveSpeed = 0.1;
                    EditLetterSizeSpeed = 0.01;
                    EditSizeSpeed = 0.01;
                    PageStart = 0;
                    MouseCursor = false;
                    Zoom = 1.0;
                    EmptyString(ProjectFile);
                    EmptyString(Pro_Str);
                    EmptyString(str_list);
                    EmptyString(line);

                    TogglePlayerControllable(playerid, true);
                    ShowPlayerDialog(playerid, -1, 0, "","", "", "" );
                    CancelSelectTextDraw(playerid);
                    return 1;
                }
                if( (!strcmp(cmdtext[5], "box", true)) || (!strcmp(cmdtext[5], "icons", true)) || (!strcmp(cmdtext[5], "adjust", true)) )
                {
                    if(EditMode == EDITMODE_ADJUST)
                    {
                        if(!VirtualKeys[26][KEY_PRESSED]) //Left Mouse Button
                        {
                            new Float:pos[2];
                            for(new i = 1; i < sizeof(TDE_Menu); i++)
                            {
                                TDE_TextDrawGetPos(TDE_Menu[i], pos[0], pos[1]);
                                TDE_TextDrawSetPos(TDE_Menu[i], pos[0], OffsetZ);
                                TDE_TextDrawShowForPlayer(playerid, TDE_Menu[i]);
                            }

                            TDE_TextDrawSetString(TD_Status, "EDITMODE_NONE");
                            EditMode = EDITMODE_NONE;
                            IsPSel = true;
                            return 1;
                        }
                        return 1;
                    }
                    IsPSel = false;
                    TDE_TextDrawSetString(TD_Status, "EDITMODE_ADJUST");
                    EditMode = EDITMODE_ADJUST;
                    SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}Press 'ESC' to finish this mode.");
                    return 1;
                }
                return SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}/tde {e2b960}(box/help)");
            }
            TDE_TextDrawSetString(TD_Status, "EDITMODE_NONE");
            EditMode = EDITMODE_NONE;
            CancelSelectTextDraw(playerid);
            IsPSel = false;
            ShowPlayerDialog(playerid, DIALOG_PROJECT, DIALOG_STYLE_LIST, "TDEditor", "Create a new project\nLoad a project\nClose project", ">>", "X");
        }
        if(ProjectEditor == -1)
        {
            new ip[16];
            GetPlayerIp(playerid, ip, 16);
            if(strcmp(ip, "127.0.0.1", false)) return SendClientMessage(playerid, -1, "{e2b960}TDEditor: {FFFFFF}TDEditor only can be used from localhost (127.0.0.1)");
            IsPSel = true;
            MouseCursor = true;
            TogglePlayerControllable(playerid, false);
            DestroyMenuTextDraws();
            CreateMenuTextDraws();
            SendClientMessage(playerid, -1, "{e2b960}TDEditor 1.17 {FFFFFF}Click on the image to start...");
            TDE_TextDrawShowForPlayer(playerid, TDELOGO);
            SelectTextDraw(playerid, -1);
            EmptyString(ProjectFile);
        }
        return true;
    }
Reply
#6

Код:
[05:16:21] [debug]  Accessing element at index 65535 past array upper bound 499
Which array of yours has a max size of 500? You're going over that limit somehow..
Reply
#7

Are you sure this is right ?
PHP код:
if( (!strcmp(cmdtext[5], "ayuda"true)) || (!strcmp(cmdtext[5], "help"true))  ) 
/tde is 3 (2) characters, no?
Reply
#8

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Код:
[05:16:21] [debug]  Accessing element at index 65535 past array upper bound 499
Which array of yours has a max size of 500? You're going over that limit somehow..
Probably an array that uses MAX_PLAYERS (Default value is 500, so 499 is the limit)
And 65535 is the INVALID_PLAYER_ID, so it's adding up.

An array is using 'playerid' as the index, and the playerid is actually invalid.
Reply
#9

ProjectEditor Needs to be ProjectEditor[MAX_PLAYERS];
Reply
#10

It's pretty weird though, the textdraw editor you're talking about doesn't cause anything whenever I use it.
Are you sure you're loading the plugin that comes with the package?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)