SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 08/03/2018, 10:35 AM   #1
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 447
Reputation: 12
Default Server keeps restarting, doesn't show online

Hey guys,

My samp-server.exe runs fine and there are no errors in the script, but the server shows offline. Retrieving info, players 0/0 and ping "-". When I join the server it connects, then says "Jordan Baker has left the server (leaving), then says "server is restarting". This loop just continues. I installed crashdetect and this is what it shows. Any help on fixing this would be greatly appreciated!

Code:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[21:22:12] filterscripts = ""  (string)
[21:22:12] 
[21:22:12] Server Plugins
[21:22:12] --------------
[21:22:12]  Loading plugin: crashdetect.dll
[21:22:12]   CrashDetect v4.18.1 is OK.
[21:22:12]   Loaded.
[21:22:12]  Loading plugin: streamer.dll
[21:22:12] 

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

[21:22:12]   Loaded.
[21:22:12]  Loaded 2 plugins.

[21:22:12] 
[21:22:12] Filterscripts
[21:22:12] ---------------
[21:22:12]   Loaded 0 filterscripts.

[21:22:12] Stage 1
[21:22:12] Dynamic Radio System: Created a radio station: "ID 1", Name: 'Country Music'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 2", Name: 'Modern Hiphop'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 3", Name: 'Kiss FM'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 4", Name: 'DeJay R&B'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 5", Name: 'Hot 108 JamZ'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 6", Name: 'CroniX Agresstion'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 7", Name: 'Sky FM - Top Hitz'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 8", Name: 'HouseTime FM - Electro'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 9", Name: 'Smooth Jazz FM'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 10", Name: 'SlowRaDio FM'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 11", Name: 'Gay FM - Pure Dance'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 12", Name: 'TDI Radio - Dance'
[21:22:12] Dynamic Radio System: Created a radio station: "ID 13", Name: '181.FM - The Buzz'
[21:22:12] Stage 2
[21:22:13] Stage 3
[21:22:13] Stage 4
[21:22:13] Stage 5
[21:22:13] Stage 6
[21:22:13] Stage 7
[21:22:13] Stage 8
[21:22:13] Stage 8
[21:22:13] Stage 9
[21:22:13] Stage 10
[21:22:13] Stage 11
[21:22:13] [debug] Run time error 4: "Array index out of bounds"
[21:22:13] [debug]  Attempted to read/write array element at index 72 in array of size 72
[21:22:13] [debug] AMX backtrace:
[21:22:13] [debug] #0 00379878 in public AddCar (72) from AZRP.amx
[21:22:13] [debug] #1 00343d24 in public Iter_OnGameModeInit () from AZRP.amx
[21:22:13] [debug] #2 native CallLocalFunction () from samp-server.exe
[21:22:13] [debug] #3 00002bb0 in public OnGameModeInit () from AZRP.amx
[21:22:13]  
[21:22:13]  
[21:22:13] AZ-RP v2.4
[21:22:13] ______________
[21:22:13]  
[21:22:13] Number of vehicle models: 81
Josh_Main is offline   Reply With Quote
Old 08/03/2018, 11:58 AM   #2
AndreiWow
High-roller
 
AndreiWow's Avatar
 
Join Date: Nov 2014
Location: Romania, Bucharest
Posts: 1,048
Reputation: 48
Default Re: Server keeps restarting, doesn't show online

Show that "AddCar"
AndreiWow is offline   Reply With Quote
Old 09/03/2018, 06:10 AM   #3
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 447
Reputation: 12
Default Re: Server keeps restarting, doesn't show online

The only AddCar I have in my script
Code:
forward AddCar(carcoords);
public AddCar(carcoords)
and
Code:
//cut from script
print("Stage 11");
	for(new i = 0; i < 165; i++)
	{
		AddCar(i);
	}
	print("Stage End");
	return 1;
}
Josh_Main is offline   Reply With Quote
Old 09/03/2018, 07:02 AM   #4
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,284
Reputation: 525
Default Re: Server keeps restarting, doesn't show online

Whatever array you are using for your cars, only has 72 vehicles in it, yet it's looking for 165. Check the array of the cars for any faults in it.
Sew_Sumi is offline   Reply With Quote
Old 09/03/2018, 07:24 AM   #5
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,202
Reputation: 390
Default Re: Server keeps restarting, doesn't show online

Maybe you're using GameModeExit(); somewhere in there?
__________________
Quote:
Originally Posted by Andy
I offer paid scripting services, I can do anything except mapping because fuck mapping.

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link
RogueDrifter is offline   Reply With Quote
Old 09/03/2018, 10:15 AM   #6
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 447
Reputation: 12
Default Re: Server keeps restarting, doesn't show online

@sew_sumi, sorry I haven't been scripting for a while so I've forgotten a lot of things, but how can I fix that problem?

@RogueDrifter, thanks heaps for your reply! I don't think that's the problem, although let me know if you see anything wrong with this
Code:
public LoadStuff()
{
	new arrCoords[16][64];
	new strFromFile2[256];
	new File: file = fopen("stuff.ini", io_read);
	if(file)
	{
		fread(file, strFromFile2);
		split(strFromFile2, arrCoords, ',');
		Jackpot = strvalEx(arrCoords[0]);
		Tax = strvalEx(arrCoords[1]);
		TaxValue = strvalEx(arrCoords[2]);
		Security = strvalEx(arrCoords[3]);
		Kicks = strvalEx(arrCoords[5]);
		Fines = strvalEx(arrCoords[6]);
		Prisons = strvalEx(arrCoords[7]);
		Slaps = strvalEx(arrCoords[8]);
		Bans = strvalEx(arrCoords[9]);
		Jails = strvalEx(arrCoords[10]);
		Spins = strvalEx(arrCoords[11]);
		MaxPlayers = strvalEx(arrCoords[12]);
		Reports = strvalEx(arrCoords[13]);
		factionsrecentlypaid = strvalEx(arrCoords[14]);
		factionpaytimer = strvalEx(arrCoords[15]);
		fclose(file);
		if(Security == 0 || Security == 1)
		{
		}
		else
		{
		    GameModeExit();
		}
	}
	else
	{
	    GameModeExit();
	}
	return 1;
}
Josh_Main is offline   Reply With Quote
Old 09/03/2018, 10:51 AM   #7
AroseKhanNiazi
High-roller
 
AroseKhanNiazi's Avatar
 
Join Date: Jan 2014
Location: Pakistan
Posts: 1,353
Reputation: 78
Default Re: Server keeps restarting, doesn't show online

Does 'stuff.ini' exist? If yes, does it have proper settings?
AroseKhanNiazi is offline   Reply With Quote
Old 09/03/2018, 10:54 AM   #8
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 447
Reputation: 12
Default Re: Server keeps restarting, doesn't show online

Just realized I don't have any of my scriptfiles! I re-downloaded the script I created from DropBox about a year ago and I didn't save any of the scriptfiles. How can I know what scriptfile folders I have to add?

EDIT: Scratch that, I just found the scriptfiles. I'll recompile the script and let you know how it goes
Josh_Main is offline   Reply With Quote
Old 09/03/2018, 11:15 AM   #9
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 447
Reputation: 12
Default Re: Server keeps restarting, doesn't show online

fixed!
Josh_Main is offline   Reply With Quote
Old 09/03/2018, 11:24 AM   #10
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,284
Reputation: 525
Default Re: Server keeps restarting, doesn't show online

Top stuff.
Sew_Sumi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server is online but doesn't show as online (IP to domain) Dignity Server Support 4 26/03/2017 12:45 AM
My server won't show as online Luke_James Server Support 0 27/01/2015 08:22 PM
Server will not show online MrCallum Server Support 4 18/10/2014 04:18 AM
[HELP] Doesn't work server, don't show online V4at Scripting Help 2 05/01/2013 11:23 AM
wtf? why server not show online for other? mineralo Scripting Help 3 21/01/2012 02:05 PM


All times are GMT. The time now is 07:33 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.