24.12.2009, 10:07
Hello, I'm rescripting my server.
But when I try to start it. it close with the follow error:
Exception At Address: 0x004802EB Registers: EAX: 0x0012FD80 EBX: 0x00000000 ECX: 0x00000000 EDX: 0x00AB9F58 ESI: 0x00000000 EDI: 0x01A56AA8 EBP: 0x0012FD90 ESP: 0x0012FD68 EFLAGS: 0x00010286 Stack: +0000: 0x01A56AA8 0x02CE34A4 0x00000000 0xFFFFFFFF +0010: 0x0012FD68 0x0012F98C 0x0012FE24 0x00483E4C +0020: 0x0049CF30 0xFFFFFFFF 0x02C84C9C 0x0040591D +0030: 0x00000000 0x00402C20 0x01A56AA8 0x0382AD70 +0040: 0x004BB0C8 0x01A56AA8 0x00000001 0x00000000 +0050: 0x00000000 0x00B478C8 0x00B478CC 0x00B478F4 +0060: 0x00AB9F58 0x00B478D8 0x00AB9F58 0x02C81CF8 +0070: 0x02CE34A4 0x00000000 0x02C80020 0x000617AC +0080: 0x00461544 0x01A56AA8 0x0012FE00 0x0000003B +0090: 0x01BC8FE8 0xFFFFFFFF 0x0000003B 0x01BC8FE8 +00A0: 0x00478B08 0x004BB0C8 0x0049C481 0x019E08C1 +00B0: 0xFFFFFFFF 0x00000000 0x01A56AA8 0x0012FEA4 +00C0: 0x00491CD8 0xFFFFFFFF 0x00477F4F 0x00000001 +00D0: 0x00000000 0x00001772 0x0012FF88 0x7FFDF000 +00E0: 0x0001F000 0x00010101 0x0000003C 0x00001E56 +00F0: 0x000000A8 0x00000670 0x01BC8FE8 0x656D6167 +0100: 0x65646F6D 0x00003531 0x004A6014 0x004A6010 +0110: 0x7FFDF000 0x00491F50 0x0012FE70 0x0012FE6C +0120: 0x0012FF78 0x00483E4C 0x0049D058 0xFFFFFFFF +0130: 0x00482308 0x00482318 0x00491F50 0x0012FF78
OnGameModeInit:
UpdateConfig()
Two other good scripters couln'td find the problem too.
I would be nice if somebody can find the problem, because i have to test some things.
But when I try to start it. it close with the follow error:
Exception At Address: 0x004802EB Registers: EAX: 0x0012FD80 EBX: 0x00000000 ECX: 0x00000000 EDX: 0x00AB9F58 ESI: 0x00000000 EDI: 0x01A56AA8 EBP: 0x0012FD90 ESP: 0x0012FD68 EFLAGS: 0x00010286 Stack: +0000: 0x01A56AA8 0x02CE34A4 0x00000000 0xFFFFFFFF +0010: 0x0012FD68 0x0012F98C 0x0012FE24 0x00483E4C +0020: 0x0049CF30 0xFFFFFFFF 0x02C84C9C 0x0040591D +0030: 0x00000000 0x00402C20 0x01A56AA8 0x0382AD70 +0040: 0x004BB0C8 0x01A56AA8 0x00000001 0x00000000 +0050: 0x00000000 0x00B478C8 0x00B478CC 0x00B478F4 +0060: 0x00AB9F58 0x00B478D8 0x00AB9F58 0x02C81CF8 +0070: 0x02CE34A4 0x00000000 0x02C80020 0x000617AC +0080: 0x00461544 0x01A56AA8 0x0012FE00 0x0000003B +0090: 0x01BC8FE8 0xFFFFFFFF 0x0000003B 0x01BC8FE8 +00A0: 0x00478B08 0x004BB0C8 0x0049C481 0x019E08C1 +00B0: 0xFFFFFFFF 0x00000000 0x01A56AA8 0x0012FEA4 +00C0: 0x00491CD8 0xFFFFFFFF 0x00477F4F 0x00000001 +00D0: 0x00000000 0x00001772 0x0012FF88 0x7FFDF000 +00E0: 0x0001F000 0x00010101 0x0000003C 0x00001E56 +00F0: 0x000000A8 0x00000670 0x01BC8FE8 0x656D6167 +0100: 0x65646F6D 0x00003531 0x004A6014 0x004A6010 +0110: 0x7FFDF000 0x00491F50 0x0012FE70 0x0012FE6C +0120: 0x0012FF78 0x00483E4C 0x0049D058 0xFFFFFFFF +0130: 0x00482308 0x00482318 0x00491F50 0x0012FF78
OnGameModeInit:
Код:
public OnGameModeInit() { UpdateConfig(); SetGameModeText("Stunt+DM+Race+Drift+Freeroam"); SendRconCommand("hostname •.• Real Stunt City •.•"); SetWorldTime(11); DisableInteriorEnterExits(); UsePlayerPedAnims(); // timers SetTimer("SendMSG",100000, true); SetTimer("DisarmCheck",1000, true); SetTimer("CheckDmStats",5000, true); // textdraws Website = TextDrawCreate(460.0, 435.0, "www.RealStuntCity.tk");//Put your own homepage here, if you like to. TextDrawFont(Website,1); TextDrawSetOutline(Website,1); TextDrawColor(Website,0xFF0000FF); TextDrawBackgroundColor(Website,0xFFFF00FF); Helpdesk = TextDrawCreate(15.0, 435.0, "/car /tele(s) /commands /home");//Change it or remove or let it if you like to. TextDrawFont(Helpdesk,1); TextDrawSetOutline(Helpdesk,1); TextDrawColor(Helpdesk,0xFFFF00FF); TextDrawBackgroundColor(Helpdesk,0xFF0000FF); OwnerName = TextDrawCreate(515.000000,10.000000,"By Addy Snow"); TextDrawAlignment(OwnerName,0); TextDrawBackgroundColor(OwnerName,Black); TextDrawFont(OwnerName,3); TextDrawLetterSize(OwnerName,0.44,1.2); TextDrawColor(OwnerName,White); TextDrawSetOutline(OwnerName,1); TextDrawSetProportional(OwnerName,1); TextDrawSetShadow(OwnerName,1); // zones DeathmatchZone = GangZoneCreate(-93.423, 1611.547, 455.4371,2148.729); SpawnZone = GangZoneCreate(-175.1681, 2382.287, 502.1487, 2615.844); new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second); for(new i = 0; i < 299; i++) { if(IsValidSkinSpawn(i)) { //AddPlayerClass(i, 14.294222, 1561.925537, 116.176315,0.0, 24, 500, 0, 0, 0, 0); AddPlayerClass(i,407.9531,2435.5325,16.5000,269.4459, 0, 0, 0, 0, 0, 0); } } if(!fexist("rsc/")) { print("\n\n > WARNING: Folder Missing From Scriptfiles\n"); SetTimerEx("PrintWarning",2500,0,"s","RealStuntCity"); OnGameModeExit(); return 1; } if(!fexist("rsc/logs/")) { print("\n\n > WARNING: Folder Missing From Scriptfiles\n"); SetTimerEx("PrintWarning",2500,0,"s","rsc/logs"); OnGameModeExit(); return 1; } if(!fexist("rsc/config/")) { print("\n\n > WARNING: Folder Missing From Scriptfiles\n"); SetTimerEx("PrintWarning",2500,0,"s","rsc/config"); OnGameModeExit(); return 1; } if(!fexist("rsc/users/")) { print("\n\n > WARNING: Folder Missing From Scriptfiles\n"); SetTimerEx("PrintWarning",2500,0,"s","rsc/users"); OnGameModeExit(); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) OnPlayerConnect(i); for(new i = 1; i < MAX_CHAT_LINES; i++) Chat[i] = "<none>"; for(new i = 1; i < MAX_REPORTS; i++) Reports[i] = "<none>"; return 1; }
Код:
stock UpdateConfig() { new file[256], File:file2, string[100]; format(file,sizeof(file),"rsc/config/Config.ini"); ForbiddenWordCount = 0; BadNameCount = 0; BadPartNameCount = 0; if(!dini_Exists("rsc/config/aka.txt")) dini_Create("rsc/config/aka.txt"); if(!dini_Exists(file)) { dini_Create(file); print("\n >Configuration File Successfully Created"); } if(!dini_Isset(file,"MaxPing")) dini_IntSet(file,"MaxPing",1200); if(!dini_Isset(file,"ReadPms")) dini_IntSet(file,"ReadPMs",1); if(!dini_Isset(file,"ReadCmds")) dini_IntSet(file,"ReadCmds",1); if(!dini_Isset(file,"MaxAdminLevel")) dini_IntSet(file,"MaxAdminLevel",5); if(!dini_Isset(file,"AdminOnlySkins")) dini_IntSet(file,"AdminOnlySkins",0); if(!dini_Isset(file,"AdminSkin")) dini_IntSet(file,"AdminSkin",217); if(!dini_Isset(file,"AdminSkin2")) dini_IntSet(file,"AdminSkin2",214); if(!dini_Isset(file,"AntiBot")) dini_IntSet(file,"AntiBot",1); if(!dini_Isset(file,"AntiSpam")) dini_IntSet(file,"AntiSpam",1); if(!dini_Isset(file,"AntiSwear")) dini_IntSet(file,"AntiSwear",1); if(!dini_Isset(file,"NameKick")) dini_IntSet(file,"NameKick",1); if(!dini_Isset(file,"PartNameKick")) dini_IntSet(file,"PartNameKick",1); if(!dini_Isset(file,"NoCaps")) dini_IntSet(file,"NoCaps",0); if(!dini_Isset(file,"Locked")) dini_IntSet(file,"Locked",0); if(!dini_Isset(file,"SaveWeap")) dini_IntSet(file,"SaveWeap",1); if(!dini_Isset(file,"SaveMoney")) dini_IntSet(file,"SaveMoney",1); if(!dini_Isset(file,"ConnectMessages")) dini_IntSet(file,"ConnectMessages",1); if(!dini_Isset(file,"AdminCmdMessages")) dini_IntSet(file,"AdminCmdMessages",1); if(!dini_Isset(file,"AutoLogin")) dini_IntSet(file,"AutoLogin",1); if(!dini_Isset(file,"MaxMuteWarnings")) dini_IntSet(file,"MaxMuteWarnings",4); if(!dini_Isset(file,"MustLogin")) dini_IntSet(file,"MustLogin",0); if(!dini_Isset(file,"MustRegister")) dini_IntSet(file,"MustRegister",0); if(!dini_Isset(file,"SpeedBoost")) dini_IntSet(file,"SpeedBoost",0); if(!dini_Isset(file,"HopBoost")) dini_IntSet(file,"HopBoost",0); if(!dini_Isset(file,"AdminHide")) dini_IntSet(file,"MustRegister",0); if(dini_Exists(file)) { ServerInfo[MaxPing] = dini_Int(file,"MaxPing"); ServerInfo[ReadPMs] = dini_Int(file,"ReadPMs"); ServerInfo[ReadCmds] = dini_Int(file,"ReadCmds"); ServerInfo[MaxAdminLevel] = dini_Int(file,"MaxAdminLevel"); ServerInfo[AdminOnlySkins] = dini_Int(file,"AdminOnlySkins"); ServerInfo[AdminSkin] = dini_Int(file,"AdminSkin"); ServerInfo[AdminSkin2] = dini_Int(file,"AdminSkin2"); ServerInfo[AntiBot] = dini_Int(file,"AntiBot"); ServerInfo[AntiSpam] = dini_Int(file,"AntiSpam"); ServerInfo[AntiSwear] = dini_Int(file,"AntiSwear"); ServerInfo[NameKick] = dini_Int(file,"NameKick"); ServerInfo[PartNameKick] = dini_Int(file,"PartNameKick"); ServerInfo[NoCaps] = dini_Int(file,"NoCaps"); ServerInfo[Locked] = dini_Int(file,"Locked"); ServerInfo[GiveWeap] = dini_Int(file,"SaveWeap"); ServerInfo[GiveMoney] = dini_Int(file,"SaveMoney"); ServerInfo[ConnectMessages] = dini_Int(file,"ConnectMessages"); ServerInfo[AdminCmdMsg] = dini_Int(file,"AdminCmdMessages"); ServerInfo[AutoLogin] = dini_Int(file,"AutoLogin"); ServerInfo[MaxMuteWarnings] = dini_Int(file,"MaxMuteWarnings"); ServerInfo[MustLogin] = dini_Int(file,"MustLogin"); ServerInfo[MustRegister] = dini_Int(file,"MustRegister"); ServerInfo[MaxMuteWarnings] = dini_Int(file,"SpeedBoost"); ServerInfo[MustLogin] = dini_Int(file,"HopBoost"); ServerInfo[MustRegister] = dini_Int(file,"AdminHide"); print("\n -Configuration Settings Loaded"); } //forbidden names if((file2 = fopen("rsc/config/ForbiddenNames.cfg",io_read))) { while(fread(file2,string)) { for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0'; BadNames[BadNameCount] = string; BadNameCount++; } fclose(file2); printf(" -%d Forbidden Names Loaded", BadNameCount); } //forbidden part of names if((file2 = fopen("rsc/config/ForbiddenPartNames.cfg",io_read))) { while(fread(file2,string)) { for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0'; BadPartNames[BadPartNameCount] = string; BadPartNameCount++; } fclose(file2); printf(" -%d Forbidden Tags Loaded", BadPartNameCount); } //forbidden words if((file2 = fopen("rsc/config/ForbiddenWords.cfg",io_read))) { while(fread(file2,string)) { for(new i = 0, j = strlen(string); i < j; i++) if(string[i] == '\n' || string[i] == '\r') string[i] = '\0'; ForbiddenWords[ForbiddenWordCount] = string; ForbiddenWordCount++; } fclose(file2); printf(" -%d Forbidden Words Loaded", ForbiddenWordCount); } }
I would be nice if somebody can find the problem, because i have to test some things.