23.06.2012, 22:15
v4.8 is released and v4.9 is soon on it's way btw.
stock HighestOnlineAdmin()
{
new id;
foreach(new i : Player)
if(pAdmin(i)>pAdmin(id)) id=i;
return id; // Right here
}
[debug] Run time error 6: "Invalid instruction" [debug] Unknown opcode 0x7800 at address 0xFFFFFFFF [debug] AMX backtrace: [debug] #0 ffffffff in ?? () at K:\Games\Projects\SA-MP Server\gamemodes\sffa.pwn:4026
It seems posting here might be pointless but I will anyway...
I get a crash detect error every few seconds pointing to the return line of this function: pawn Code:
Code:
[debug] Run time error 6: "Invalid instruction" [debug] Unknown opcode 0x7800 at address 0xFFFFFFFF [debug] AMX backtrace: [debug] #0 ffffffff in ?? () at K:\Games\Projects\SA-MP Server\gamemodes\sffa.pwn:4026 |
No matter what I do or try, I cannot get this plugin to load.
Running Windows Server 2008 R2 Web Server Edition, 64-b // 6.1.7601 Service Pack 1 Build 7601 I have tried compiling with "-d3 -r" in pawn.cfg in the pawno folder, I have tried putting msvcr100d.dll in the same folder as samp-server.exe, I have installed the VC++ 2008 redistributable. Every single time I start the server, I get: Can anybody suggest something new to try? |
Loading plugin: crashdetect
Failed. Windows Server 2008 R2 64Bit pls help me |
[02:53:32] [debug] Server crashed while executing GPP.amx [02:53:32] [debug] AMX backtrace: [02:53:32] [debug] #0 0000002a in Float:operator-(Float:) (Float:oper=0.00000) at C:\Documents and Settings\Tomek\Pulpit\Tomek\Pawno\include\float.inc:109 [02:53:32] [debug] #1 0000002a in Float:operator-(Float:) (Float:oper=0.00000, ... <5247 variable arguments>) at C:\Documents and Settings\Tomek\Pulpit\Tomek\Pawno\include\float.inc:109 [02:53:32] [debug] Native backtrace: [02:53:32] [debug] #0 b75515f9 in crashdetect::PrintNativeBacktrace () from plugins/crashdetect.so [02:53:32] [debug] #1 b7553c7c in crashdetect::Crash () from plugins/crashdetect.so [02:53:32] [debug] #2 b7559123 in ?? () from plugins/crashdetect.so [02:53:32] [debug] #3 ffffe400 in ?? () [02:53:32] [debug] #4 b7554022 in crashdetect::HandleAmxExec () from plugins/crashdetect.so [02:53:32] [debug] #5 b7557d1b in ?? () from plugins/crashdetect.so [02:53:32] [debug] #6 b73128f5 in ProcessTick () from plugins/mysql.so [02:53:32] [debug] #7 080cff82 in ?? () from ./samp03svr [02:53:32] [debug] #8 080ad6bc in ?? () from ./samp03svr [02:53:32] [debug] #9 080a8fb3 in ?? () from ./samp03svr [02:53:32] [debug] #10 b757cca6 in __libc_start_main () from /lib/i686/cmov/libc.so.6 [02:53:32] [debug] #11 0804b491 in ?? () from ./samp03svr
dcmd_tazer(playerid, params[])
{
new Float:X, Float:Y, Float:Z, player1;
if(sscanf(params,"u", player1)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] USAGE: /tazer [id]");
if(player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player is offline!");
if(IsCuffed[player1] == 1) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player already shocked!");
if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != SWAT)
{
SendClientMessage(playerid,COLOR_RED,"You are not a Police Unit!");
return 1;
}
GetPlayerPos(player1, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z))
{
TogglePlayerControllable(player1, false);
IsTazed[player1] = 1;
GameTextForPlayer(player1, "~r~ Shocked!", 4000, 4);
SetTimerEx("tazertimer", 7000, false, "u", player1);
SendClientMessage(playerid, 0xFF0000AA, "{00FF00}[SUCCESSFUL SHOCKED!]");
SendClientMessage(player1, 0xFF0000AA, "{FF0000}You have shocked by a Police Unit!");
}
return 1;
}
@Wolfmaster: You've declared a variable that you've never used and other things. Here, I've fixed the code a bit:
pawn Code:
|
[debug] Run time error 5: "Invalid memory access" [debug] AMX backtrace: [debug] #0 0001964c in public OnPlayerCommandText (playerid=9, cmdtext[]=@0x000a2850 "") at D:\Program Files (x86)\Rockstar Games\server1\filterscripts\ladmin4v2.pwn:2275
dcmd_register(playerid,params[]) { if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,red,"ACCOUNT: You are already logged in!"); if (strlen(params) < 4 || strlen(params) > 20) return SendClientMessage(playerid,red,"ACCOUNT: The password lenght is incorrect!"); if(!strlen(params)) return SendClientMessage(playerid, red, "ACCOUNT: USAGE: /register password"); if (udb_Create(PlayerName2(playerid),params)) { new Rfile[256],name[MAX_PLAYER_NAME], Rtmp3[100]; GetPlayerName(playerid,name,sizeof(name)); format(Rfile,sizeof(Rfile),"/ladmin/users/%s.sav",udb_encode(name)); dini_Set(Rfile,"password",params); GetPlayerIp(playerid,Rtmp3,100); dini_Set(Rfile,"ip",Rtmp3); dUserSetINT(PlayerName2(playerid)).("registered",1); new strdate[20], year,month,day; getdate(year, month, day); format(strdate, sizeof(strdate), "%d/%d/%d",year,month,day); dini_Set(Rfile,"RegisteredDate",strdate); dUserSetINT(PlayerName2(playerid)).("loggedin",1); dUserSetINT(PlayerName2(playerid)).("banned",0); dUserSetINT(PlayerName2(playerid)).("level",0); dUserSetINT(PlayerName2(playerid)).("LastOn",0); dUserSetINT(PlayerName2(playerid)).("money",0); dUserSetINT(PlayerName2(playerid)).("kills",0); dUserSetINT(PlayerName2(playerid)).("deaths",0); dUserSetINT(PlayerName2(playerid)).("hours",0); dUserSetINT(PlayerName2(playerid)).("minutes",0); dUserSetINT(PlayerName2(playerid)).("seconds",0); dUserSetINT(PlayerName2(playerid)).("score",0); PlayerInfo[playerid][LoggedIn] = 1; PlayerInfo[playerid][Registered] = 1; SendClientMessage(playerid, green, "ACCOUNT: Successful registration!"); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); } return 1; }
dcmd_contract(playerid,params[]) { new tmp[128],tmp2[256],idx,val; new id = strval(params); tmp=strtok(params,idx); tmp2=strtok(params,idx); id=strval(tmp); val=strval(tmp2); if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp) || !IsNumeric(tmp2)) { return SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /contract [id] [/contract price = more than 1000$]"); } else if(!IsPlayerConnected(id)) { return SendClientMessage(playerid,COLOR_RED,"Incorrect ID!"); } else if(val>GetPlayerMoney(playerid) || val<1000){ return SendClientMessage(playerid,COLOR_RED,"You don't have 1000$! (the minimum price!)"); } else if(playerid==id) { return SendClientMessage(playerid,COLOR_RED,"Try it an other ID! (It's you!)"); } else if(verdij[id]==1) { return SendClientMessage(playerid,COLOR_RED,"You have already called the hitman!"); } else { new String[255], pName[MAX_PLAYER_NAME], kName[MAX_PLAYER_NAME]; bMoney[id]=val; verdij[id]=1; GetPlayerName(playerid,kName,sizeof(kName)); GetPlayerName(id,pName,sizeof(pName)); format(String,sizeof(String),"[CONTRACT]: %s called a hitman. Target person: %s [Price: $ %d]",kName,pName,val); SendClientMessageToAll(COLOR_YELLOW,String); GivePlayerMoney(playerid,-val); } return 1; }
[debug] Run time error 5: "Invalid memory access" [debug] AMX backtrace: [debug] #0 00032b40 in public OnPlayerCommandText (playerid=9, cmdtext[]=@0x001664b0 "") at D:\Program Files (x86)\Rockstar Games\server1\gamemodes\Gamemode.pwn:5008
dcmd_tazer(playerid, params[]) { new Float:X, Float:Y, Float:Z, player1; if(sscanf(params,"u", player1)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] USAGE: /tazer [id]"); if(player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player is offline!"); if(IsCuffed[player1] == 1) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player already shocked!"); if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != SWAT) { SendClientMessage(playerid,COLOR_RED,"You are not a Police Unit!"); return 1; } GetPlayerPos(player1, X, Y, Z); if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z)) { TogglePlayerControllable(player1, false); IsTazed[player1] = 1; GameTextForPlayer(player1, "~r~ Shocked!", 4000, 4); SetTimerEx("tazertimer", 7000, false, "u", player1); SendClientMessage(playerid, 0xFF0000AA, "{00FF00}[SUCCESSFUL SHOCKED!]"); SendClientMessage(player1, 0xFF0000AA, "{FF0000}You have shocked by a Police Unit!"); } return 1; }
public OnRuntimeError(error_code, &bool:suppress_message);