Gamemode script errors.
#1

And these are the errors:


pawn Код:
C:\Users\Elias\Desktop\New folder\gamemodes\sd.pwn(139) : warning 217: loose indentation
C:\Users\Elias\Desktop\New folder\gamemodes\sd.pwn(144) : warning 217: loose indentation
C:\Users\Elias\Desktop\New folder\gamemodes\sd.pwn(153) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.




Here is the script:




pawn Код:
// This script was made by [BoSs]Frost

#include <ladmin>
#include <a_samp>
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#pragma unused ret_memcpy
///////////////NEW objects shit///////////////
new infopickup;
new exitpickup;
//////////////////////////////////////////////
main()
{
    print("\n----------------------------------");
    print(" BoSs Clan Server 0.0.1");
    print("----------------------------------\n");
}


public OnGameModeInit()
{
    SetGameModeText("Ventura RPG");
    AddPlayerClass(188, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(185, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(120, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(217, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(240, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(93, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    exitpickup = CreatePickup(1239,1,388.8720,173.8050,1008.3828);
    infopickup = CreatePickup(1239,1,2488.0466,2397.3337,10.8203);
// spawn car
    AddStaticVehicle(451,2040.0525,1319.2756,10.3833,183.2440,16,16);
// spawn car
    AddStaticVehicle(429,2040.5231,1359.2783,10.3712,177.1306,13,13);
// spawn bike
    AddStaticVehicle(522,2031.3623,1359.5353,10.3907,256.2907,6,25);
// spawn bike
    AddStaticVehicle(522,2031.9823,1361.4525,10.3772,268.9690,6,25);
// spawn bike
    AddStaticVehicle(522,2031.8800,1363.1105,10.3942,268.6747,6,25);

    return 1;
}


public OnGameModeExit()
{
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid,1966.9149,1342.9484,16.6161);
    SetPlayerCameraPos(playerid,1958.3783,1343.1572,15.3746);
    SetPlayerCameraLookAt(playerid,1958.3783,1343.1572,15.3746);
    return 1;
}


public OnPlayerConnect(playerid)
{
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,2000);

    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}


public OnPlayerSpawn(playerid)
{
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}


public OnVehicleSpawn(vehicleid)
{
    return 1;
}


public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}


public OnPlayerText(playerid, text[])
{
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/fbitp", true) == 0) {
        SetPlayerPos(playerid, 2496.3687,2394.4463,10.8203);
        return 1;
    }
    if (strcmp(cmdtext, "/enter", true) == 0) {
        if(IsPlayerInRangeOfPoint(playerid,10,2488.0466,2397.3337,10.8203)) {
            SetPlayerPos(playerid,388.8720,173.8050,1008.3828);
            return 1;
        }
    }
    if (strcmp(cmdtext, "/exit", true) == 0) {
        if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173.8050,1008.3828)) {
            SetPlayerPos(playerid,2488.0466,2397.3337,10.8203);
            return 1;
        }
       if (strcmp(cmdtext, "/kill", true) == 0)
    {
        SetPlayerHealth(playerid, 0.0);
        return 1;
    }
    if (strcmp(cmdtext, "/para", true) == 0)
    {
        GivePlayerWeapon(playerid, 46, 1);
        return 1;
    }
    return 0;
}


}


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}


public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}


public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}


public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}


public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}


public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}


public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}


public OnRconCommand(cmd[])
{
    return 1;
}


public OnPlayerRequestSpawn(playerid)
{
    return 1;
}


public OnObjectMoved(objectid)
{
    return 1;
}


public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == infopickup) {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",3000,1);
    }
    if(pickupid == exitpickup) {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",3000,1);
    }
    return 1;
}


public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}


public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}


public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}


public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}


public OnPlayerExitedMenu(playerid)
{
    return 1;
}


public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}


public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}


public OnPlayerUpdate(playerid)
{
    return 1;
}


public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}


public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}


public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}


public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}


public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}


PS. I really appriciate quick respond
Reply
#2

pawn Код:
// This script was made by [BoSs]Frost

#include <ladmin>
#include <a_samp>
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#pragma unused ret_memcpy
///////////////NEW objects shit///////////////
new infopickup;
new exitpickup;
//////////////////////////////////////////////
main()
{
    print("\n----------------------------------");
    print(" BoSs Clan Server 0.0.1");
    print("----------------------------------\n");
}


public OnGameModeInit()
{
    SetGameModeText("Ventura RPG");
    AddPlayerClass(188, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(185, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(120, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(217, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(240, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    AddPlayerClass(93, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 1500, 0, 0, 0, 0);
    exitpickup = CreatePickup(1239,1,388.8720,173.8050,1008.3828);
    infopickup = CreatePickup(1239,1,2488.0466,2397.3337,10.8203);
// spawn car
    AddStaticVehicle(451,2040.0525,1319.2756,10.3833,183.2440,16,16);
// spawn car
    AddStaticVehicle(429,2040.5231,1359.2783,10.3712,177.1306,13,13);
// spawn bike
    AddStaticVehicle(522,2031.3623,1359.5353,10.3907,256.2907,6,25);
// spawn bike
    AddStaticVehicle(522,2031.9823,1361.4525,10.3772,268.9690,6,25);
// spawn bike
    AddStaticVehicle(522,2031.8800,1363.1105,10.3942,268.6747,6,25);

    return 1;
}


public OnGameModeExit()
{
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid,1966.9149,1342.9484,16.6161);
    SetPlayerCameraPos(playerid,1958.3783,1343.1572,15.3746);
    SetPlayerCameraLookAt(playerid,1958.3783,1343.1572,15.3746);
    return 1;
}


public OnPlayerConnect(playerid)
{
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,2000);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,2000);

    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}


public OnPlayerSpawn(playerid)
{
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}


public OnVehicleSpawn(vehicleid)
{
    return 1;
}


public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}


public OnPlayerText(playerid, text[])
{
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/fbitp", true) == 0)
    {
        SetPlayerPos(playerid, 2496.3687,2394.4463,10.8203);
        return 1;
    }
    if (strcmp(cmdtext, "/enter", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,10,2488.0466,2397.3337,10.8203))
        {
            SetPlayerPos(playerid,388.8720,173.8050,1008.3828);
            return 1;
        }
    }
    if (strcmp(cmdtext, "/exit", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173.8050,1008.3828))
        {
            SetPlayerPos(playerid,2488.0466,2397.3337,10.8203);
            return 1;
        }
    }
    if (strcmp(cmdtext, "/kill", true) == 0)
    {
        SetPlayerHealth(playerid, 0.0);
        return 1;
    }
    if (strcmp(cmdtext, "/para", true) == 0)
    {
        GivePlayerWeapon(playerid, 46, 1);
        return 1;
    }
    return 0;
}


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}


public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}


public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}


public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}


public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}


public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}


public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}


public OnRconCommand(cmd[])
{
    return 1;
}


public OnPlayerRequestSpawn(playerid)
{
    return 1;
}


public OnObjectMoved(objectid)
{
    return 1;
}


public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == infopickup) {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",3000,1);
    }
    if(pickupid == exitpickup) {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",3000,1);
    }
    return 1;
}
This works.
Reply
#3

Under "OnPlayerCommandText" you've got an unnecessary closing bracket, delete it!
Reply
#4

Instead of simply feeding the guy a working piece of code and waiting until he returns with a similar problem, why not explain what the issues are about in the first place?

About warning 217: click and READ it
About warning 209: the code that would cause such warning is:
pawn Код:
public OnPlayerConnect(playerid)
{
    if(something == true)
    {
        return false;
    }
    // continue code here
}
To fix it, you need to add a return...
pawn Код:
public OnPlayerConnect(playerid)
{
    if(something == true)
    {
        return false;
    }
    // continue code here
    return true;
}
Reply
#5

Thanks guys
Reply
#6

by the way you know a good register + login FS? i need make my self admin, havent done that yet
Reply
#7

[FilterScript] TuL's Register & Login FS (dini) USEFUL
Reply
#8

oh yeea i will use that thanks dude,

#SOLVED
Reply
#9

no rep! anyway welcome and best of luck.
Reply
#10

All admin syetem FilterScripts
http://forum.sa-mp.com/search.php?searchid=4245624
-Enjoy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)