Need help
#1

Need help here, guys! samp-server.exe restarts after using /makeadmin. Checked the logs. Here are what crashdetect detected

Код:
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:39:35] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[12:40:05] [debug] Server crashed while executing larp.amx
[12:40:05] [debug] AMX backtrace:
[12:40:05] [debug] #0 native fwrite () [004056e0] from samp-server.exe
[12:40:05] [debug] #1 00173a50 in ?? () from larp.amx
[12:40:05] [debug] #2 000cd50c in public OnPlayerCommandText () from larp.amx
[12:40:05] [debug] Native backtrace:
[12:40:05] [debug] #0 76fe6b90 in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[12:40:05] [debug] #1 00498bb8 in ?? () from C:\Users\4neals\Desktop\Scripting\PRototype Roleplay v1.0\samp-server.exe
[12:40:05] [debug] #2 0040531e in ?? () from C:\Users\4neals\Desktop\Scripting\PRototype Roleplay v1.0\samp-server.exe
Reply
#2

Show the code for /makeadmin
Reply
#3

PHP код:
    if(strcmp(cmd"/makeadmin"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /makeadmin [playerid/PartOfName] [level(1-3)]");
                return 
1;
            }
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
level strval(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 10)
            {
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(playeridnamesizeof(name));
                        
CMDLog(name,cmdtext);
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
GiveNameSpace(sendername);
                        
GiveNameSpace(giveplayer);
                        if(
PlayerInfo[playerid][pAdmin] == 11) { sendername "Hidden Admin"; }
                        new 
Float:shealth;
                        
GetPlayerHealth(para1,shealth);
                        
SetPlayerHealthEx(para1,shealth);
                        new 
Float:darmour;
                        
GetPlayerArmour(para1,darmour);
                        
SetPlayerArmourEx(para1,darmour);
                        
PlayerInfo[para1][pAdmin] = level;
                        
//printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
                        
format(stringsizeof(string), "   You have been promoted to a level %d admin by %s"levelsendername);
                        
SendClientMessage(para1COLOR_WHITEstring);
                        
format(stringsizeof(string), "   You have promoted %s to a level %d admin."giveplayer,level);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
format(stringsizeof(string), "[ID: %d]  %s has promoted %s [ID: %d] to a level %d admin."playeridsendernamegiveplayerpara1,level);
                        
ABroadCast(COLOR_YELLOWstring1);
                        
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   You are not authorized to use that command!");
            }
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)