17.02.2013, 15:05
Hello,
I have 8 errors.
Script:
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.
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;
}