Filescript some time load failed
#1

Helllo!
idk how its start bugged bat some time me fillescript maps doesnt load fine like today its really messy as fuck like at server-log its says
Код:
[00:47:01]   Filterscript 'lvhoodzma.amx' loaded.
[00:47:01]   Filterscript 'lvhoodzma.amx' load failed.
[00:47:13] Selected humans
[00:47:13] Finished Selecting teams
[00:48:36]   Filterscript 'lvhoodzma.amx' unloaded.
[00:48:36] loading Map /Maps/3.ini
Bat for real this map is loaded its fine, bat map like this
Код:
[00:50:01]   Filterscript 'campoutzma.amx' load failed.
[00:50:01]   Filterscript 'campoutzma.amx' load failed.
didn't load. I cant see maps.
So what problem can be?
Reply
#2

If you try to load an already loaded filterscript, it fails.
Reply
#3

You cannot load a already loaded FS, Reload it instead!
Reply
#4

The maximum number of FS is 16 and also, follow the above reply.
Reply
#5

I didn't load it twice. I dont know what happen everything was fine and now happen like this.
Reply
#6

Me filescript line at server.cfg is empty
Reply
#7

Quote:
Originally Posted by henkas
Посмотреть сообщение
Me filescript line at server.cfg is empty
Then you are loading filterscripts through the gamemode. Check the script for it.
Reply
#8

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
Then you are loading filterscripts through the gamemode. Check the script for it.
Yes its through per gamemode bat i cant find exactly the maps name how its called on gamemode
its just these lines
Код:
stock CheckToStartMap()
{
	if(Map[IsStarted] == 0)
	{
		LoadMap(LoadNewMap());
		StartMap();
		Map[IsStarted] = 1;
	}
	return 1;
}
Код:
stock GetRandomMap()
{
    new file[64];
    new i = 0, count = 0, Maps[MAX_MAP_FILES], Mapid;
    for( ; i != MAX_MAP_FILES; ++i)
	{
	    if(LastMapStarted == i) continue;
	    format(file, sizeof(file), "/Maps/%d.ini", i);
		if(fexist(file))
		{
 			Maps[count] = i;
 			count++;
 		}
    }
    if(count == 0)
	{
	    return NoMapCheck();
    }
    Mapid = Maps[random(count)];

	format(file, sizeof(file), "/Maps/%d.ini", Mapid);
	if(fexist(file))
	{
	    LastMapStarted = Mapid;
	    return Mapid;
	}
	else return printf("[NOTICE] File Bugged.");
}
Код:
stock LoadFilterScript(filename[])
{
	new string[128];
	format(string, sizeof(string), "loadfs %s", filename);
	SendRconCommand(string);
	return 1;
}

stock UnloadFilterScript(filename[])
{
	new string[128];
	format(string, sizeof(string), "unloadfs %s", filename);
	SendRconCommand(string);
	return 1;
}
Код:
stock LoadMap(Mapid)
{
	new Map_file[64];
	format(Map_file, sizeof(Map_file), "/Maps/%d.ini", Mapid);
	if(fexist(Map_file))
	{
		printf("loading Map %s", Map_file);
	    INI_ParseFile(Map_file, "load_Map_%s", .bExtra = true, .extra = Mapid);
	    return 1;
	}
	return 0;
}

stock LoadNewMap()
{
    new file[64];
    mapid %= MAX_MAP_FILES;
    format(file, sizeof(file), "/Maps/%d.ini", mapid);
    if(!fexist(file)) return printf("[NOTICE] File Bugged.");
    LastMapStarted = mapid;
    mapid++;
    return mapid-1;
}
Код:
stock GetMapCount()
{
	new mcount = 0, file[128];
	for(new i = 0; i < MAX_MAP_FILES; i++)
	{
        format(file, sizeof(file), "/Maps/%d.ini", i);
	    if(fexist(file))
	    {
	        mcount ++;
	    }
	}
	return mcount;
}

stock GetFreeMapID()
{
    new file[32], id = 0;
	for(new i = 0; i < MAX_MAP_FILES; i++)
	{
        format(file, sizeof(file), "/Maps/%d.ini", i);
	    if(fexists(file)) continue;
	    id = i;
	    break;
	}
	return id;
}

stock NoMapCheck()
{
	new tcount = 0, file[128];
	for(new i = 0; i < MAX_MAP_FILES; i++)
	{
	    format(file, sizeof(file), "/Maps/%d.ini", i);
	    if(fexist(file))
	    {
	        tcount ++;
	    }
	}
	if(tcount == 0)
	{
	    print("_____________________________________________________________");
	    print("WARNING: The server has detected there are no map files!");
	    print("currently installed. The server has been set to");
	    print("automatically shut down in 25000/ MS. (25 Seconds)");
	    print("_____________________________________________________________");
	    SetTimer("No_Maps", 25000, false);
	    return 1;
	}
	return 1;
}

function No_Maps() return SendRconCommand("exit");

public load_Map_basic(Mapid, name[], value[])
{
	if(strcmp(name, "FSMapName", true) == 0)
	{
		strmid(Map[FSMapName], value, false, strlen(value), 128);
		LoadFilterScript(Map[FSMapName]);
	}

	/*printf("[Debug] Name: %s - Value: %s", name, value);  For Debug Purposes*/

	if(strcmp(name, "MapName", true) == 0)
	{
	    new mpname[50];
		strmid(Map[MapName], value, false, strlen(value), 128);
		format(mpname, sizeof(mpname), "mapname %s", Map[MapName]);
	    SendRconCommand(mpname);
	}

	if(strcmp(name, "HumanSpawnX", true) == 0) Map[HumanSpawnX] = floatstr(value);
	if(strcmp(name, "HumanSpawnY", true) == 0) Map[HumanSpawnY] = floatstr(value);
	if(strcmp(name, "HumanSpawnZ", true) == 0) Map[HumanSpawnZ] = floatstr(value);
	if(strcmp(name, "HumanSpawn2X", true) == 0) Map[HumanSpawn2X] = floatstr(value);
	if(strcmp(name, "HumanSpawn2Y", true) == 0) Map[HumanSpawn2Y] = floatstr(value);
	if(strcmp(name, "HumanSpawn2Z", true) == 0) Map[HumanSpawn2Z] = floatstr(value);
	if(strcmp(name, "ZombieSpawnX", true) == 0) Map[ZombieSpawnX] = floatstr(value);
	if(strcmp(name, "ZombieSpawnY", true) == 0) Map[ZombieSpawnY] = floatstr(value);
	if(strcmp(name, "ZombieSpawnZ", true) == 0) Map[ZombieSpawnZ] = floatstr(value);
	if(strcmp(name, "ZombieSpawn2X", true) == 0) Map[ZombieSpawn2X] = floatstr(value);
	if(strcmp(name, "ZombieSpawn2Y", true) == 0) Map[ZombieSpawn2Y] = floatstr(value);
	if(strcmp(name, "ZombieSpawn2Z", true) == 0) Map[ZombieSpawn2Z] = floatstr(value);
	if(strcmp(name, "Interior", true) == 0) Map[Interior] = strval(value);
	if(strcmp(name, "GateX", true) == 0) Map[GateX] = floatstr(value);
	if(strcmp(name, "GateY", true) == 0) Map[GateY] = floatstr(value);
	if(strcmp(name, "GateZ", true) == 0) Map[GateZ] = floatstr(value);
	if(strcmp(name, "CPx", true) == 0) Map[CPx] = floatstr(value);
	if(strcmp(name, "CPy", true) == 0) Map[CPy] = floatstr(value);
	if(strcmp(name, "CPz", true) == 0) Map[CPz] = floatstr(value);
	if(strcmp(name, "GaterX", true) == 0) Map[GaterX] = floatstr(value);
	if(strcmp(name, "GaterY", true) == 0) Map[GaterY] = floatstr(value);
	if(strcmp(name, "GaterZ", true) == 0) Map[GaterZ] = floatstr(value);
    if(strcmp(name, "MoveGate", true) == 0) Map[MoveGate] = strval(value);
    if(strcmp(name, "GateID", true) == 0) Map[GateID] = strval(value);
	if(strcmp(name, "AllowWater", true) == 0) Map[AllowWater] = strval(value);
	if(strcmp(name, "EvacType", true) == 0) Map[EvacType] = strval(value);
	if(strcmp(name, "Weather", true) == 0)
	{
		Map[Weather] = strval(value);
		SetWeather(Map[Weather]);
	}

	if(strcmp(name, "Time", true) == 0)
	{
		Map[Time] = strval(value);
		SetWorldTime(Map[Time]);
 	 	printf("Map ID %d's Information Has Been Loaded.", Mapid);
	}
	return 1;
}
Its all with load map i think. Do you find something wrong?
Reply
#9

One weird think i'm not sure is it true or maybe map bug bat if map loaded objects is duplicated
Reply
#10

Can you post the lines you find using this "LoadFilterScript"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)