8 Errors with gamemode
#1

Hello,
I have 8 errors.
Код:
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(19) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(18) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(31) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(39) : error 055: start of function body without function header
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(40) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(41) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(42) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(43) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(44) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(61) : error 021: symbol already defined: "PlayerInfo"
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(170) : error 017: undefined symbol "COLOR_RED"
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(224) : warning 213: tag mismatch
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(394) : warning 203: symbol is never used: "RankName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Script:
pawn Код:
/*/////////////////////////////////////////
        Semi Warfare 1.0.0
       
Changelog:

_1.0.0_
- Script created

Credits:
Script and Mapping: stormchaser206
sscanf Plugin: ******
Streamer Plugin: Incognito
Achievement Include: iPLEOMAX
stormLang: Me (stormchaser206)
SA-MP: Kalcor and all of the SA-MP team

Change #define SERVER_NAME to your server's name!

//////////////////////////////////*/


#include <a_samp>
#include <sscanf>
#include <GeoIP_Plugin>
#include <Ach>
#include <stormlang>


#define COLOR_ERROR 0xFF0000FF
#define COLOR_ORANGE 0xFF8000FF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_PINK 0xFF00FFFF
#define COLOR_AQUA 0x00FFFFFF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_WEIRD1 0xB8FF7BFF
#define COLOR_BLACK 0x000000FF

#define SERVER_NAME "Semi-Warfare"

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

#define DIALOG_CREDITS   17690

enum pInfo
{
    Registered,
    LoggedIn,
    Cash,
    Score,
    AdmLevel,
    VipRank,
    Team,
    Deaths,
    Kills,
    Rank
}
new PlayerInfo[MAX_PLAYERS][pInfo];
new RankName[100];


new PlayerInfo[MAX_PLAYERS][pInfo];

main()
{
    print("\n--------------------------------------------");
    print(" =O= Semi-Warfare Starter Script loaded! =O= ");
    print("----------------------------------------------\n");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Semi-Warfare 1.0.0");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

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

public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new string[100];
    format(string, sizeof(string), "-| %s(%d) has connected to %s|-", name, playerid, SERVER_NAME);
    SendClientMessageToAll(COLOR_PINK, string);
    return 1;
}

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

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new polString[128];
    new engString[128];
    new gerString[128];
    new spanString[128];
    new reasonMsg[50];
   
    if(killerid != INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case 0: reasonMsg = "Unarmed";
            case 1: reasonMsg = "Brass Knuckles";
            case 2: reasonMsg = "Golf Club";
            case 3: reasonMsg = "Night Stick";
            case 4: reasonMsg = "Knife";
            case 5: reasonMsg = "Baseball Bat";
            case 6: reasonMsg = "Shovel";
            case 7: reasonMsg = "Pool Cue";
            case 8: reasonMsg = "Katana";
            case 9: reasonMsg = "Chainsaw";
            case 10: reasonMsg = "Dildo";
            case 11: reasonMsg = "Dildo";
            case 12: reasonMsg = "Vibrator";
            case 13: reasonMsg = "Vibrator";
            case 14: reasonMsg = "Flowers";
            case 15: reasonMsg = "Cane";
            case 22: reasonMsg = "Pistol";
            case 23: reasonMsg = "Silenced Pistol";
            case 24: reasonMsg = "Desert Eagle";
            case 25: reasonMsg = "Shotgun";
            case 26: reasonMsg = "Sawn-off Shotgun";
            case 27: reasonMsg = "Combat Shotgun";
            case 28: reasonMsg = "Uzi";
            case 29: reasonMsg = "MP5";
            case 30: reasonMsg = "AK-47";
            case 31: reasonMsg = "M4";
            case 32: reasonMsg = "TEC-9";
            case 33: reasonMsg = "Country Rifle";
            case 34: reasonMsg = "Sniper Rifle";
            case 37: reasonMsg = "Fire";
            case 38: reasonMsg = "Minigun";
            case 41: reasonMsg = "Spray Can";
            case 42: reasonMsg = "Fire Extinguisher";
            case 49: reasonMsg = "Vehicle Collision";
            case 50: reasonMsg = "Vehicle Collision";
            case 51: reasonMsg = "Explosion";
            case 52: reasonMsg = "Bombing Run";
            case 53: reasonMsg = "Nuke";
            default: reasonMsg = "Unknown";
        }
       
        format(engString, sizeof(engString), "-| You have been killed by %s(%d) and have lost $50", name, killerid);
        format(spanString, sizeof(spanString), "-| Han sido asesinados por %s(%d) y han perdido $50 |-", name, killerid);
        format(gerString, sizeof(gerString), "-| Sie wurden durch %s(%d) getotet und 50 $ verloren |-", name, killerid);
        format(polString, sizeof(polString), "-| Zostales zabity przez %s(%d) i stracili 50 dolarуw |-", name, killerid);
        SendMessage(playerid, COLOR_RED, engString, spanString, gerString, polString);
        GivePlayerMoney(playerid, -50);
    }
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

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

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

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(credits,7,cmdtext);
   
    //Admin Commands

    //Level 1
    dcmd(asay,4,cmdtext);
    return 0;
}


//=============================//
//        COMMANDS             //
//=============================//
dcmd_credits(playerid, params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits", "{8F2271}Map: stormchaser206\n{49AA8C}Main Script: stormchaser206\nsscanf: ******", "OK", "");
    return 1;
}


//====================================//
//        ADMIN COMMANDS             //
//===================================//
dcmd_asay(playerid, params[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new text[80];
    new string[100];
    if (sscanf(params, "s[50]", text)) SendClientMessage(playerid, COLOR_ERROR, "USAGE: /asay [Text]");
    else if(!PlayerInfo[playerid][AdmLevel] < 1 || !IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be admin level 1 to use this command.");
    else
    {
        format(string, sizeof(string), "Admin %s(%d): %s", name, playerid, text);
        SendClientMessageToAll(COLOR_AQUA, string);
    }
    return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

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

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 432 && PlayerInfo[playerid][Rank] <= 5)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a SERGEANT to drive a tank.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 425 && PlayerInfo[playerid][Rank] <= 7)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a FIRST SERGEANT to pilot hunters.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 447 && PlayerInfo[playerid][Rank] <= 3)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must a SPECIALIST to pilot sea sparrows.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 520 && PlayerInfo[playerid][Rank] <= 7)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a FIRST SERGEANT to pilot hydras.");
            RemovePlayerFromVehicle(playerid);
        }
    }
    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)
{
    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[])
{
    if(dialogid == DIALOG_CREDITS)
    {
        //The player has pressed "OK"(because it's de only avaliable button.)
    }
    return 1;
}

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

You defined player info 2 times, you didn't define COLOR_RED
And for others,
Please type them here I can't see them.
Reply
#3

Now this:
Код:
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(19) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(18) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(31) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(39) : error 055: start of function body without function header
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(40) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(41) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(42) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(43) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(44) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(221) : warning 213: tag mismatch
C:\Users\Keegan\Desktop\SA\gamemodes\semiwarfare.pwn(391) : warning 203: symbol is never used: "RankName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
I changed the COLOR_RED to COLOR_ERROR, and i removed one of the new PlayerInfo;

New code:
pawn Код:
/*/////////////////////////////////////////
        Semi Warfare 1.0.0
       
Changelog:

_1.0.0_
- Script created

Credits:
Script and Mapping: stormchaser206
sscanf Plugin: ******
Streamer Plugin: Incognito
Achievement Include: iPLEOMAX
stormLang: Me (stormchaser206)
SA-MP: Kalcor and all of the SA-MP team

Change #define SERVER_NAME to your server's name!

//////////////////////////////////*/


#include <a_samp>
#include <sscanf>
#include <GeoIP_Plugin>
#include <Ach>
#include <stormlang>


#define COLOR_ERROR 0xFF0000FF
#define COLOR_ORANGE 0xFF8000FF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_PINK 0xFF00FFFF
#define COLOR_AQUA 0x00FFFFFF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_WEIRD1 0xB8FF7BFF
#define COLOR_BLACK 0x000000FF

#define SERVER_NAME "Semi-Warfare"

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

#define DIALOG_CREDITS   17690

enum pInfo
{
    Registered,
    LoggedIn,
    Cash,
    Score,
    AdmLevel,
    VipRank,
    Team,
    Deaths,
    Kills,
    Rank
}
new PlayerInfo[MAX_PLAYERS][pInfo];
new RankName[100];

main()
{
    print("\n--------------------------------------------");
    print(" =O= Semi-Warfare Starter Script loaded! =O= ");
    print("----------------------------------------------\n");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Semi-Warfare 1.0.0");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

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

public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new string[100];
    format(string, sizeof(string), "-| %s(%d) has connected to %s|-", name, playerid, SERVER_NAME);
    SendClientMessageToAll(COLOR_PINK, string);
    return 1;
}

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

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new polString[128];
    new engString[128];
    new gerString[128];
    new spanString[128];
    new reasonMsg[50];
   
    if(killerid != INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case 0: reasonMsg = "Unarmed";
            case 1: reasonMsg = "Brass Knuckles";
            case 2: reasonMsg = "Golf Club";
            case 3: reasonMsg = "Night Stick";
            case 4: reasonMsg = "Knife";
            case 5: reasonMsg = "Baseball Bat";
            case 6: reasonMsg = "Shovel";
            case 7: reasonMsg = "Pool Cue";
            case 8: reasonMsg = "Katana";
            case 9: reasonMsg = "Chainsaw";
            case 10: reasonMsg = "Dildo";
            case 11: reasonMsg = "Dildo";
            case 12: reasonMsg = "Vibrator";
            case 13: reasonMsg = "Vibrator";
            case 14: reasonMsg = "Flowers";
            case 15: reasonMsg = "Cane";
            case 22: reasonMsg = "Pistol";
            case 23: reasonMsg = "Silenced Pistol";
            case 24: reasonMsg = "Desert Eagle";
            case 25: reasonMsg = "Shotgun";
            case 26: reasonMsg = "Sawn-off Shotgun";
            case 27: reasonMsg = "Combat Shotgun";
            case 28: reasonMsg = "Uzi";
            case 29: reasonMsg = "MP5";
            case 30: reasonMsg = "AK-47";
            case 31: reasonMsg = "M4";
            case 32: reasonMsg = "TEC-9";
            case 33: reasonMsg = "Country Rifle";
            case 34: reasonMsg = "Sniper Rifle";
            case 37: reasonMsg = "Fire";
            case 38: reasonMsg = "Minigun";
            case 41: reasonMsg = "Spray Can";
            case 42: reasonMsg = "Fire Extinguisher";
            case 49: reasonMsg = "Vehicle Collision";
            case 50: reasonMsg = "Vehicle Collision";
            case 51: reasonMsg = "Explosion";
            case 52: reasonMsg = "Bombing Run";
            case 53: reasonMsg = "Nuke";
            default: reasonMsg = "Unknown";
        }
       
        format(engString, sizeof(engString), "-| You have been killed by %s(%d) and have lost $50", name, killerid);
        format(spanString, sizeof(spanString), "-| Han sido asesinados por %s(%d) y han perdido $50 |-", name, killerid);
        format(gerString, sizeof(gerString), "-| Sie wurden durch %s(%d) getotet und 50 $ verloren |-", name, killerid);
        format(polString, sizeof(polString), "-| Zostales zabity przez %s(%d) i stracili 50 dolarуw |-", name, killerid);
        SendMessage(playerid, COLOR_ERROR, engString, spanString, gerString, polString);
        GivePlayerMoney(playerid, -50);
    }
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

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

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

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(credits,7,cmdtext);
   
    //Admin Commands

    //Level 1
    dcmd(asay,4,cmdtext);
    return 0;
}


//=============================//
//        COMMANDS             //
//=============================//
dcmd_credits(playerid, params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits", "{8F2271}Map: stormchaser206\n{49AA8C}Main Script: stormchaser206\nsscanf: ******", "OK", "");
    return 1;
}


//====================================//
//        ADMIN COMMANDS             //
//===================================//
dcmd_asay(playerid, params[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new text[80];
    new string[100];
    if (sscanf(params, "s[50]", text)) SendClientMessage(playerid, COLOR_ERROR, "USAGE: /asay [Text]");
    else if(!PlayerInfo[playerid][AdmLevel] < 1 || !IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be admin level 1 to use this command.");
    else
    {
        format(string, sizeof(string), "Admin %s(%d): %s", name, playerid, text);
        SendClientMessageToAll(COLOR_AQUA, string);
    }
    return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

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

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 432 && PlayerInfo[playerid][Rank] <= 5)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a SERGEANT to drive a tank.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 425 && PlayerInfo[playerid][Rank] <= 7)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a FIRST SERGEANT to pilot hunters.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 447 && PlayerInfo[playerid][Rank] <= 3)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must a SPECIALIST to pilot sea sparrows.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 520 && PlayerInfo[playerid][Rank] <= 7)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a FIRST SERGEANT to pilot hydras.");
            RemovePlayerFromVehicle(playerid);
        }
    }
    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)
{
    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[])
{
    if(dialogid == DIALOG_CREDITS)
    {
        //The player has pressed "OK"(because it's de only avaliable button.)
    }
    return 1;
}

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

Please just type the lines. Not the whole code.
Reply
#5

Here are my error lines:
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//Line 40 Above
//Line 41
#define DIALOG_CREDITS   17690 //Line 42
//Line 43
enum pInfo //Line 44
And yes, I have an enum with the pInfo
Reply
#6

bump
Reply
#7

This Errors are on your include, check that line in stormlang.inc

pawn Код:
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(18) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(31) : warning 216: nested comment
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(39) : error 055: start of function body without function header
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(40) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(41) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(42) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(43) : error 010: invalid function or declaration
C:\Users\Keegan\Desktop\SA\pawno\include\stormlang.inc(44) : error 010: invalid function or declaration
Here is the rest of the script, i compiled it without any errors, i a commented some of yourfunction, include and variables that you dont use
pawn Код:
/*
/////////////////////////////////////////
        Semi Warfare 1.0.0

Changelog:

_1.0.0_
- Script created

Credits:
Script and Mapping: stormchaser206
sscanf Plugin: ******
Streamer Plugin: Incognito
Achievement Include: iPLEOMAX
stormLang: Me (stormchaser206)
SA-MP: Kalcor and all of the SA-MP team

Change #define SERVER_NAME to your server's name!

//////////////////////////////////
*/


#include <a_samp>
#include <sscanf2>
//#include <GeoIP_Plugin>
//#include <Ach>
//#include <stormlang>


#define COLOR_ERROR 0xFF0000FF
#define COLOR_ORANGE 0xFF8000FF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_PINK 0xFF00FFFF
#define COLOR_AQUA 0x00FFFFFF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_WEIRD1 0xB8FF7BFF
#define COLOR_BLACK 0x000000FF

#define SERVER_NAME "Semi-Warfare"

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

#define DIALOG_CREDITS   17690

enum pInfo
{
    Registered,
    LoggedIn,
    Cash,
    Score,
    AdmLevel,
    VipRank,
    Team,
    Deaths,
    Kills,
    Rank
}
new PlayerInfo[MAX_PLAYERS][pInfo];
//new RankName[100];

main()
{
    print("\n--------------------------------------------");
    print(" =O= Semi-Warfare Starter Script loaded! =O= ");
    print("----------------------------------------------\n");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Semi-Warfare 1.0.0");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

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

public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new string[100];
    format(string, sizeof(string), "-| %s(%d) has connected to %s|-", name, playerid, SERVER_NAME);
    SendClientMessageToAll(COLOR_PINK, string);
    return 1;
}

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

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new polString[128];
    new engString[128];
    new gerString[128];
    new spanString[128];
    new reasonMsg[50];

    if(killerid != INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case 0: reasonMsg = "Unarmed";
            case 1: reasonMsg = "Brass Knuckles";
            case 2: reasonMsg = "Golf Club";
            case 3: reasonMsg = "Night Stick";
            case 4: reasonMsg = "Knife";
            case 5: reasonMsg = "Baseball Bat";
            case 6: reasonMsg = "Shovel";
            case 7: reasonMsg = "Pool Cue";
            case 8: reasonMsg = "Katana";
            case 9: reasonMsg = "Chainsaw";
            case 10: reasonMsg = "Dildo";
            case 11: reasonMsg = "Dildo";
            case 12: reasonMsg = "Vibrator";
            case 13: reasonMsg = "Vibrator";
            case 14: reasonMsg = "Flowers";
            case 15: reasonMsg = "Cane";
            case 22: reasonMsg = "Pistol";
            case 23: reasonMsg = "Silenced Pistol";
            case 24: reasonMsg = "Desert Eagle";
            case 25: reasonMsg = "Shotgun";
            case 26: reasonMsg = "Sawn-off Shotgun";
            case 27: reasonMsg = "Combat Shotgun";
            case 28: reasonMsg = "Uzi";
            case 29: reasonMsg = "MP5";
            case 30: reasonMsg = "AK-47";
            case 31: reasonMsg = "M4";
            case 32: reasonMsg = "TEC-9";
            case 33: reasonMsg = "Country Rifle";
            case 34: reasonMsg = "Sniper Rifle";
            case 37: reasonMsg = "Fire";
            case 38: reasonMsg = "Minigun";
            case 41: reasonMsg = "Spray Can";
            case 42: reasonMsg = "Fire Extinguisher";
            case 49: reasonMsg = "Vehicle Collision";
            case 50: reasonMsg = "Vehicle Collision";
            case 51: reasonMsg = "Explosion";
            case 52: reasonMsg = "Bombing Run";
            case 53: reasonMsg = "Nuke";
            default: reasonMsg = "Unknown";
        }

        format(engString, sizeof(engString), "-| You have been killed by %s(%d) and have lost $50", name, killerid);
        SendClientMessage(playerid, COLOR_ERROR, engString);

        format(spanString, sizeof(spanString), "-| Han sido asesinados por %s(%d) y han perdido $50 |-", name, killerid);
        SendClientMessage(playerid, COLOR_ERROR,spanString);

        format(gerString, sizeof(gerString), "-| Sie wurden durch %s(%d) getotet und 50 $ verloren |-", name, killerid);
        SendClientMessage(playerid, COLOR_ERROR,gerString);

        format(polString, sizeof(polString), "-| Zostales zabity przez %s(%d) i stracili 50 dolarуw |-", name, killerid);
        SendClientMessage(playerid, COLOR_ERROR,polString);
        GivePlayerMoney(playerid, -50);
    }
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

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

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

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(credits,7,cmdtext);

    //Admin Commands

    //Level 1
    dcmd(asay,4,cmdtext);
    return 0;
}


//=============================//
//        COMMANDS             //
//=============================//
dcmd_credits(playerid, params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits", "{8F2271}Map: stormchaser206\n{49AA8C}Main Script: stormchaser206\nsscanf: ******", "OK", "");
    return 1;
}


//====================================//
//        ADMIN COMMANDS             //
//===================================//
dcmd_asay(playerid, params[])
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new text[80];
    new string[100];
    if (sscanf(params, "s[50]", text)) SendClientMessage(playerid, COLOR_ERROR, "USAGE: /asay [Text]");
    else if(PlayerInfo[playerid][AdmLevel] < 1 || IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be admin level 1 to use this command.");
    else
    {
        format(string, sizeof(string), "Admin %s(%d): %s", name, playerid, text);
        SendClientMessageToAll(COLOR_AQUA, string);
    }
    return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

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

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 432 && PlayerInfo[playerid][Rank] <= 5)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a SERGEANT to drive a tank.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 425 && PlayerInfo[playerid][Rank] <= 7)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a FIRST SERGEANT to pilot hunters.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 447 && PlayerInfo[playerid][Rank] <= 3)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must a SPECIALIST to pilot sea sparrows.");
            RemovePlayerFromVehicle(playerid);
        }
        if(GetVehicleModel(vehicleid) == 520 && PlayerInfo[playerid][Rank] <= 7)
        {
            SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must be at least a FIRST SERGEANT to pilot hydras.");
            RemovePlayerFromVehicle(playerid);
        }
    }
    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)
{
    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[])
{
    if(dialogid == DIALOG_CREDITS)
    {
        //The player has pressed "OK"(because it's de only avaliable button.)
    }
    return 1;
}

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

Thanks, but how can i fix this (these are the lines in the 40s)
pawn Код:
stock SetPlayerLanguage(playerid, language);
{
    if(language == -1) return pLanguage[playerid] = -1;
    if(language == 0) return pLanguage[playerid] = 0;
    if(language == 1) return pLanguage[playerid] = 1;
    if(language == 2) return pLanguage[playerid] = 2;
    if(language == 3) return pLanguage[playerid] = 3;
}
It's in stormlang.inc
Reply
#9

Could you post the stormlang include here, on pastebin, or give a link to the thread?
There might be some undeclared things, which can cause these errors, but we need to see a little more
Reply
#10

Also if you can update your storm lang inc, why did you release it? because it has a error

I hope im in the credits, but if not, its alright atleast i contributed something
but here is the full fixed stormlang.inc

With Edited To Call back Version
pawn Код:
/*
//////////////////////////////
        StormLang 1.0.0
           ©2013

    1.0.0 supports English, Spanish/Espanol, German/Deutsch, and Polish/Polski

    All rights to stormchaser206.
    Fixed By: PDS2012

    You are ALLOWED to do these things:
    - Edit
    - Redistribute WITH CREDITS
    - Use for personal/server use

    You are NOT ALLOWED to do these things:
    - Sell the script
    - Steal & Redistribute without credits

//////////////////////////////
*/


#include <a_samp>

new pLanguage[MAX_PLAYERS] = -1;

/*

pLanguage options:
-1 = No language selected
0 = English
1 = Spanish
2 = German
3 = Polish
*/



/*
///////////////////////////
        STOCKS
///////////////////////////
*/

forward SetPlayerLanguage(playerid, language);
public SetPlayerLanguage(playerid, language)
{
    if(language == -1) return pLanguage[playerid] = -1;
    if(language == 0) return pLanguage[playerid] = 0;
    if(language == 1) return pLanguage[playerid] = 1;
    if(language == 2) return pLanguage[playerid] = 2;
    if(language == 3) return pLanguage[playerid] = 3;
    return true;
}

stock SendMessage(playerid, color, English[], Spanish[], German[], Polish[])
{
    switch(pLanguage[playerid])
    {
        case 0: //English
        {
            SendClientMessage(playerid, color, English);
        }
        case 1: //Spanish
        {
            SendClientMessage(playerid, color, Spanish);
        }
        case 2: //German
        {
            SendClientMessage(playerid, color, German);
        }
        case 3: //Polish
        {
            SendClientMessage(playerid, color, Polish);
        }
    }
    return true;
}

stock GetPlayerLanguageName(playerid)
{
    new name[35];

    if(pLanguage[playerid] == -1)
    {
        name = "No Language";
    }

    if(pLanguage[playerid] == 0)
    {
        name = "English";
    }

    if(pLanguage[playerid] == 1)
    {
        name = "Espanol";
    }

    if(pLanguage[playerid] == 2)
    {
        name = "Deutsch";
    }

    if(pLanguage[playerid] == 3)
    {
        name = "Polski";
    }
    return name;
}

stock GetPlayerLanguage(playerid)
{
    new lan;

    if(pLanguage[playerid] == -1)
    {
        lan = -1;
    }

    if(pLanguage[playerid] == 0)
    {
        lan = 0;
    }

    if(pLanguage[playerid] == 1)
    {
        lan = 1;
    }

    if(pLanguage[playerid] == 2)
    {
        lan = 2;
    }

    if(pLanguage[playerid] == 3)
    {
        lan = 3;
    }
    return lan;
}
Stays in stock version but fixed
pawn Код:
/*
//////////////////////////////
        StormLang 1.0.0
           ©2013

    1.0.0 supports English, Spanish/Espanol, German/Deutsch, and Polish/Polski

    All rights to stormchaser206.
    Fixed By: PDS2012

    You are ALLOWED to do these things:
    - Edit
    - Redistribute WITH CREDITS
    - Use for personal/server use

    You are NOT ALLOWED to do these things:
    - Sell the script
    - Steal & Redistribute without credits

//////////////////////////////
*/


#include <a_samp>

new pLanguage[MAX_PLAYERS] = -1;

/*

pLanguage options:
-1 = No language selected
0 = English
1 = Spanish
2 = German
3 = Polish
*/



/*
///////////////////////////
        STOCKS
///////////////////////////
*/

stock SetPlayerLanguage(playerid, language)
{
    if(language == -1) return pLanguage[playerid] = -1;
    if(language == 0) return pLanguage[playerid] = 0;
    if(language == 1) return pLanguage[playerid] = 1;
    if(language == 2) return pLanguage[playerid] = 2;
    if(language == 3) return pLanguage[playerid] = 3;
    return true;
}

stock SendMessage(playerid, color, English[], Spanish[], German[], Polish[])
{
    switch(pLanguage[playerid])
    {
        case 0: //English
        {
            SendClientMessage(playerid, color, English);
        }
        case 1: //Spanish
        {
            SendClientMessage(playerid, color, Spanish);
        }
        case 2: //German
        {
            SendClientMessage(playerid, color, German);
        }
        case 3: //Polish
        {
            SendClientMessage(playerid, color, Polish);
        }
    }
    return true;
}

stock GetPlayerLanguageName(playerid)
{
    new name[35];

    if(pLanguage[playerid] == -1)
    {
        name = "No Language";
    }

    if(pLanguage[playerid] == 0)
    {
        name = "English";
    }

    if(pLanguage[playerid] == 1)
    {
        name = "Espanol";
    }

    if(pLanguage[playerid] == 2)
    {
        name = "Deutsch";
    }

    if(pLanguage[playerid] == 3)
    {
        name = "Polski";
    }
    return name;
}

stock GetPlayerLanguage(playerid)
{
    new lan;

    if(pLanguage[playerid] == -1)
    {
        lan = -1;
    }

    if(pLanguage[playerid] == 0)
    {
        lan = 0;
    }

    if(pLanguage[playerid] == 1)
    {
        lan = 1;
    }

    if(pLanguage[playerid] == 2)
    {
        lan = 2;
    }

    if(pLanguage[playerid] == 3)
    {
        lan = 3;
    }
    return lan;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)