help with the map
#1
I'm in map testing part and i'm having this issue

Code:
server\pawno\include\jSSumoTestMapName.inc(12) : fatal error 100: cannot read from file: "SumoCore2_upd3"
Reply
#2
Save the following code as "SumoCore2_upd3.inc" in your pawno\include folder, then recompile your map:

Code:
//////////////////////////////////
// Sumo Serv - Sumo Test Include ///////////
// Allows test of basic map functionality //
//            v1.3.0 - RDL                ///////
// For the love of fuck, do not edit this file //
/////////////////////////////////////////////////
#include <a_samp>
#pragma tabsize 0
#define SKIN_ID 101

// WEATHERS
#define SUNNY 18
#define RAINY 8
#define STORMY 8
#define FOGGY 9
#define SANDSTORM 19
#define CLOUDY 15

// Gamemode - there used to be others, but currently only 1
#define NORMAL 1

// variables
new PlayerCount = 0;
new UserVehicle;
new ScriptInfo[];
new AccountInfo[50][50];
new Text3D:CSV[100];

// colors, we only need two.
#define COLOR_AQUA                0x0AB084FF
#define COLOR_GREY                 0xAFAFAFAA

// define all the variables. Defaults entered are real world defaults for Sumo as of 3.7.0
// These get changed by whats in your map, although not many of them are used in this test anyway.
new Float:Z_FALLOFF                 = 0.0;
new GAME_MODE_TYPE                = 1;
new WIN_TIME                    = 400;
new MapTime                          = 12;
new Weather                          = 2;
new RED_IDENTIFY_TYPE             = 1;
new MAP_TIMEOUT                  = 2250;
new GIVE_NITRO                     = 0;
new RANDOM_MODDED_VEHICLES        = 1;
new MOD_ALL_VEHICLES             = 0;
new ELIMINATE_FLIP                 = 0;
new FLIP_FLIPPED                 = 0;
new ENABLE_NOT_MOVE_LOSE        = 0;
new NOT_MOVE_WARNINGS            = 3;
new ENABLE_REPAIR                  = 0;
new REPAIR_INTERVAL              = 60;
new REPAIR_AMOUNT                  = 160;
new REPAIR_X                     = 125;
new MAX_ALLOWED_HEALTH             = 2500;
new ENABLE_FIRE_TRUCK_RESCUE    = 1;
new ALLOW_RAMP_SPAWNING            = 0;
new ALLOW_BARREL_SPAWNING        = 0;
new Float:MAX_Z                    = -0.1;
new MAP_INCLUDES_WEAPONS         = 0;
new MAP_USES_SPEED_ALTERATION     = 0;
new AC_DISABLE_HEALTH_DETECTION = 0;
new MAX_SPEED_ALLOWED             = 125;
new DISABLE_Z_DETECTION            = 0;
new ALLOW_EARLY_FINISH             = 1;
new DISABLE_BC5_CHECK             = 1;
new DISABLE_ACHIEVEMENTS        = 0;
new FORCE_DUEL_CAR                = 0;
new FIRE_TRUCK_RESCUE_AMT        = 500;
new SUDDEN_DEATH                = 0;
new MAX_SPEED_INCREASE_PER_TICK    = 18;
new CHEAT_MODE = 0;
new CHEAT_MODE_USES = 2;
new DISABLE_RTD = 0, DISABLE_DEJAVU = 0;
new REMOVE_LOADOUT_RESTRICTIONS = 0;
// We don't use most of the above. So just tell the PAWN compiler this, else it'll shit out lots of warnings.
#pragma unused DISABLE_DEJAVU, DISABLE_RTD, ALLOW_BARREL_SPAWNING, AccountInfo, REPAIR_X, UserVehicle, REMOVE_LOADOUT_RESTRICTIONS
#pragma unused ENABLE_FIRE_TRUCK_RESCUE, REPAIR_AMOUNT, REPAIR_INTERVAL, ENABLE_REPAIR, NOT_MOVE_WARNINGS, ENABLE_NOT_MOVE_LOSE
#pragma unused FLIP_FLIPPED, ELIMINATE_FLIP, MOD_ALL_VEHICLES, RANDOM_MODDED_VEHICLES, GIVE_NITRO, MAP_TIMEOUT
#pragma unused RED_IDENTIFY_TYPE, WIN_TIME, GAME_MODE_TYPE, MAX_ALLOWED_HEALTH, ScriptInfo, PlayerCount
#pragma unused DISABLE_BC5_CHECK, ALLOW_EARLY_FINISH, MAX_SPEED_ALLOWED, AC_DISABLE_HEALTH_DETECTION
#pragma unused MAP_INCLUDES_WEAPONS, MAP_USES_SPEED_ALTERATION, DISABLE_Z_DETECTION, CHEAT_MODE, CHEAT_MODE_USES
#pragma unused MAX_Z, FORCE_DUEL_CAR, DISABLE_ACHIEVEMENTS, FIRE_TRUCK_RESCUE_AMT, SUDDEN_DEATH, MAX_SPEED_INCREASE_PER_TICK

// Define some dud functions, just for compilation sake.
stock IsVehicleValidForSettings(var){
    #pragma unused var
    return 1;
}

stock FinalizeLoading(){
    SetWorldTime(MapTime); // We'll atleast set your map time
    SetWeather(Weather); // Also your weather. Ain't that nice of us?
    return 1;
}

stock SpawnedFunction(playerid){    
    TogglePlayerControllable(playerid,1);
    return 1;
}

public OnPlayerConnect(playerid){
    #if defined OnPlayerConEx
        OnPlayerConEx(playerid); // Call the maps version of this too, incase you want to test something you put there.
    #endif
    TogglePlayerControllable(playerid,1);
    return 1;
}

public OnPlayerUpdate(playerid){
    #if defined OnPlayerUpdateEx
        OnPlayerUpdateEx(playerid);
    #endif
    return 1;
}

public OnPlayerDeath(playerid,killerid,reason){
    #if defined OnPlayerDeathEx
        OnPlayerDeathEx(playerid,killerid,reason); // Call the maps version of this too, incase you want to test something you put there.
    #endif
    return 1;
}

public OnPlayerDisconnect(playerid,reason)
{
    #if defined OnPlayerDisconnectEx
        OnPlayerDisconnectEx(playerid,reason); // Call the maps version of this too, incase you want to test something you put there.
    #endif
    return 1;
}
main(){}

// And now lets do some real functions. For the sake of testing the map.
public OnPlayerCommandText(playerid, cmdtext[]){
    if(strcmp(cmdtext,"/help",true) ==0)
    {
        SendClientMessage(playerid,COLOR_GREY,"Hi. Thanks for making a map! This is the test script for your map. There are some commands, listed below.");
        SendClientMessage(playerid,COLOR_GREY,"To spawn all possible spawnplaces, to check for bad spawns - type /spawnall");
        SendClientMessage(playerid,COLOR_GREY,"To spawn using only small vehicles (A Landstalker is used for this) - type /spawnsmall");
        SendClientMessage(playerid,COLOR_GREY,"To spawn using only big vehicles (A Bus is used for this) - type /spawnbig.");
        SendClientMessage(playerid,COLOR_GREY,"To spawn using only huge vehicles (Dumpers & Harvesters are used for this) - type /spawnhuge.");
        SendClientMessage(playerid,COLOR_GREY,"To delete all vehicles (including any you're in) use /destroyall");
        SendClientMessage(playerid,COLOR_GREY,"To test if you're above or below the Z_LIMIT, type /zcheck");
        SendClientMessage(playerid,COLOR_GREY,"If you need to kill yourself. Type /kill");
        return 1;
    }
    if(strcmp(cmdtext,"/zcheck",true) == 0)
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid,x,y,z);
        if(MAX_Z != -0.1){
            if(z > MAX_Z) SendClientMessage(playerid,COLOR_GREY,"You're ABOVE the MAX_Z limit. You WOULD be eliminated here.");
            else if(z < MAX_Z) SendClientMessage(playerid,COLOR_GREY,"You're BELOW the MAX_Z limit. You would NOT be eliminated here.");
            else if(z == MAX_Z) SendClientMessage(playerid,COLOR_GREY,"You're exactly at the MAX_Z limit. You WOULD be eliminated here.");
        }
        
        if(z > Z_FALLOFF) return SendClientMessage(playerid,COLOR_GREY,"You're ABOVE the z limit. You would NOT be eliminated here.");
        else if(z < Z_FALLOFF){ SendClientMessage(playerid,COLOR_GREY,"You're BELOW the z limit. You WOULD be eliminated here."); OnPlayerElimination(playerid,1,-1); return 1;}
        else if(z == Z_FALLOFF) return SendClientMessage(playerid,COLOR_GREY,"You're exactly at the z limit. You NOT be eliminated here.");
        SetPlayerHealth(playerid,0.0);
        return 1;
    }
    if(strcmp(cmdtext,"/spawnall",true) == 0)
    {
        SendClientMessage(playerid,COLOR_GREY,"Spawned all vehicles using random vehicles from your specified loadout.");
        SpawnAllVehicles(0);
        return 1;
    }
    if(strcmp(cmdtext,"/spawnbig",true) == 0)
    {
        SendClientMessage(playerid,COLOR_GREY,"Spawned all vehicles using a large vehicle.");
        SpawnAllVehicles(1);
        return 1;
    }
    if(strcmp(cmdtext,"/spawnsmall",true) == 0)
    {
        SendClientMessage(playerid,COLOR_GREY,"Spawned all vehicles using a small vehicle.");
        SpawnAllVehicles(2);
        return 1;
    }
    if(strcmp(cmdtext,"/spawnhuge",true) == 0)
    {
        SendClientMessage(playerid,COLOR_GREY,"Spawned all vehicles using a huge vehicle.");
        SpawnAllVehicles(3);
        return 1;
    }
    if(strcmp(cmdtext,"/destroyall",true) == 0)
    {
        SendClientMessage(playerid,COLOR_GREY,"Destroyed all vehicles.");
        SpawnAllVehicles(4);
        return 1;
    }
    if(strcmp(cmdtext,"/kill",true) == 0)
    {
        SetPlayerHealth(playerid,0.0);
        return 1;
    }
    return 0;
}

stock SpawnAllVehicles(type){
    // type: 0 = normal, 1 = big only, 2 = small only, 3 = huge only,  4 = delete all
    for(new i = 0; i < 500; i++)
    {
        if(type != 4){ UserVehicleCreate(i,type); }
        else{
            Delete3DTextLabel(CSV[i]);
            DestroyVehicle(i);
        }
    }
    return 1;
}

stock CreateSumoVehicle(playerid,model,Float:X,Float:Y,Float:Z,Float:A,void1=-1,void2=-1,void3=-1){
    #pragma unused void3
    CreateVehicle(model,Float:X,Float:Y,Float:Z,Float:A,void1,void2,5);
    
    new string[50];
    format(string,sizeof(string),"PlayerID %d spawns here!",playerid);
    CSV[playerid] = Create3DTextLabel(string, 0xFFFFFFFF,X,Y,Z,180.0, 0, 0);
    return 1;
}

enum DynSpawns // store dynamic things
{
    Float:vX,
    Float:vY,
    Float:vZ,
    Float:vA
};
new DynamicSpawns[100][DynSpawns], totalDynSpawns;

AddDynamicSpawn(Float:X,Float:Y,Float:Z,Float:A)
{
    DynamicSpawns[totalDynSpawns][vX] = X;
    DynamicSpawns[totalDynSpawns][vY] = Y;
    DynamicSpawns[totalDynSpawns][vZ] = Z;
    DynamicSpawns[totalDynSpawns][vA] = A;
    totalDynSpawns++;
}
stock UserVehicleCreate(playerid,type){
    new veid; // Get random vehicle from the allowed array you specified in loadout.
    if(type == 1) veid = 431; // Bus
    else if(type == 2) veid = 400; // Landstalker
    for(new i = 0; i < sizeof(totalDynSpawns); i++)
    {
        if(type == 3) { new r = random(2); if(r == 0) veid = 406; else veid = 532; } // Dumper / Harvester
        DynamicallySpawnPlayer(playerid,veid);
    }
    return 1;
}
stock DynamicallySpawnPlayer(playerid,model)
{
    new thisid;
    thisid = CreateVehicle(model,DynamicSpawns[playerid][vX],DynamicSpawns[playerid][vY],DynamicSpawns[playerid][vZ],DynamicSpawns[playerid][vA],-1,-1,5);
    PutPlayerInVehicle(playerid,thisid,0);
    return thisid;
}

stock GetRandomSkin(playerid)
{
    #pragma unused playerid
    // nothing, placeholder
}

stock OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new Float:pX,Float:pY,Float:pZ,Float:pA; // Real sumo core deletes ramps after 3 to 5 seconds.
    if(ALLOW_RAMP_SPAWNING == 1 && IsPlayerInAnyVehicle(playerid)){
        if ((newkeys & KEY_LOOK_BEHIND ) && !(oldkeys & KEY_LOOK_BEHIND )) // MMB / 2
        {
            GetPlayerPos(playerid,pX,pY,pZ);
            GetPlayerFacingAngle(playerid,pA);
            GetXYInFrontOfPlayer(playerid,pX,pY,12.5);
            CreateObject(1245,pX,pY,pZ,pA,0.0,0.0,500);
        }
    }
    #if defined OnPlayerKeyStateChangeEx
        OnPlayerKeyStateChangeEx(playerid,newkeys,oldkeys)
    #endif
    return 1;
}

stock OnPlayerCommandTextExEx(playerid,cmdtext[])
{
    #if defined OnPlayerCommandText
        OnPlayerCommandText(playerid,cmdtext[])
    #endif
}

stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{    

    new Float:a;

    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);

    if (GetPlayerVehicleID(playerid)) {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }

    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}

public OnPlayerSpawn(playerid)
{
    OnPlayerSpawnEx(playerid);
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    #if defined OnPlayerEnterRaceCheckpointEx
        OnPlayerEnterRaceCheckpointEx(playerid);
    #endif
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    #if defined OnPlayerEnterCheckpointEx
        OnPlayerEnterCheckpointEx(playerid);
    #endif
    return 1;
}

public OnPlayerRequestClass(playerid,classid)
{
    OnPlayerRequestClassEx(playerid,classid);
    return 1;
}
// End of file.

By the way, you can find the test include right under your map file (http://sumoserv.com/map/editmap.php?mid=600).

Edit: Map link fix.
Reply
#3
Code:
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(156) : error 017: undefined symbol "FinalizeLoading"
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(285) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(286) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(287) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(288) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(289) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(290) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(291) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(292) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(293) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(294) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(295) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(296) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(297) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(298) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(299) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(300) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(301) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(302) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(303) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(304) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(305) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(306) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(307) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(308) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(309) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(310) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(311) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(312) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(313) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(314) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(315) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(316) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(317) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(318) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(319) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(320) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(321) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(322) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(323) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(324) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(325) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(326) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(327) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(328) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(329) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(330) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(331) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(332) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(333) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(334) : warning 215: expression has no effect
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(340) : warning 203: symbol is never used: "ALLOWED_FAV_TYPE"
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(38) : warning 204: symbol is assigned a value that is never used: "ALLOW_RAMP_SPAWNING"
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(38 -- 340) : warning 203: symbol is never used: "CSV"
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(25) : warning 204: symbol is assigned a value that is never used: "MapTime"
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(27) : warning 204: symbol is assigned a value that is never used: "Weather"
C:\Users\User\Desktop\zaky server\gamemodes\Zakka Heights.pwn(23) : warning 204: symbol is assigned a value that is never used: "Z_FALLOFF"


did as you said johnny got this error, excuse me this is my first map and thanks for your help
Reply
#4
Okay so basically.

Z_FALLOFF is only 1 coordinate. The Z aka the height.

Try this: Z_FALLOFF = 300;

Then there is a problem with the FinalizeLoading() function, but I can't see what going from the test and map file.

I wish I could help more, but I have to get to bed for work tomorrow :/
[Image: output.php]
Reply
#5
(04-28-2017, 12:43 PM)CM707 Wrote: Okay so basically.

Z_FALLOFF is only 1 coordinate. The Z aka the height.

Try this: Z_FALLOFF = 300;

Then there is a problem with the FinalizeLoading() function, but I can't see what going from the test and map file.

I wish I could help more, but I have to get to bed for work tomorrow :/

can someone finish this for me, would be a great help thanks

it would be better if you fix the errors and let me know whats my errors, i would really appreciate that, thank you
Reply
#6
Done, mapID 600. Next time stick to the instructions, it isn't that hard if you read everything carefully. You could avoid your errors easily.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)