29.08.2012, 18:52
(
Последний раз редактировалось aTk Pirate; 30.08.2012 в 04:13.
)
I just recently started looking into scripting and I honestly have no experience with any type of coding at all. Anyways I found some tuts to get me started with basic scripting in the pawno file but seem to be getting a few errors when I attempt to compile it and I can't figure out what is causing them, the error numbers are 001, 010, and I am getting warning 217 and warning 203..If anyone could take a few minutes to hop on team viewer I'd appreciate it.
Quote:
C:\Users\Chris\Desktop\SAMP\gamemodes\tut.pwn(64) : warning 217: loose indentation C:\Users\Chris\Desktop\SAMP\gamemodes\tut.pwn(64) : error 001: expected token: ",", but found ";" C:\Users\Chris\Desktop\SAMP\gamemodes\tut.pwn(6 : warning 217: loose indentation C:\Users\Chris\Desktop\SAMP\gamemodes\tut.pwn(93) : error 010: invalid function or declaration C:\Users\Chris\Desktop\SAMP\gamemodes\tut.pwn(95) : error 010: invalid function or declaration C:\Users\Chris\Desktop\SAMP\gamemodes\tut.pwn(11 : warning 203: symbol is never used: "ret_memcpy" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. |
pawn Код:
///included
#include <a_samp>
#include <dini>
#include <dutils>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOUR_GREEN 0x33AA33AA
#define COLOUR_RED 0xAA3333AA
#define COLOUR_YELLOW 0xFFFF00AA
#define COLOUR_LIGHTBLUE 0x33CCFFAA
#define COLOUR_ORANGE 0xFF9900AA
#define PlayerFile "AdminScript/Users/%s.ini"
#define SettingFile "AdminScript/Settings/MainSettings.ini"
#define CommandFile "AdminScript/Settings/Commands.ini"
///Defines
#define COLOR_RED 0xAA3333AA
main()
{
}
public OnFilterScriptInit()
{
print("\n****************************************");
print("* Admin Filterscript by Adam_Cipriani *");
print("****************************************\n");
return 1;
}
#endif
enum PLAYER_MAIN {
PLAYER_NAME[MAX_PLAYER_NAME],
PLAYER_IP[16],
PLAYER_REGGED,
PLAYER_PASS,
PLAYER_LOGGED,
PLAYER_LEVEL,
PLAYER_WIRED,
PLAYER_JAILED
}
new gPlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
public OnGameModeInit()
{
print("The Game Mod Was Initiated!");
return 1;
}
public OnGameModeExit()
{
print("The Game Mode Was Exited");
return 1;
}
public OnPlayerConnect(playerid)
{
new file[100],Name[MAX_PLAYER_NAME],Ip[16];
GetPlayerName(playerid,Name,sizeof(Name);
GetPlayerIp(playerid,Ip,sizeof(Ip));
format(file,sizeof(file),PlayerFile,Name);
if(!dini_Exists(file))
{
dini_Create(file);
dini_Set(file,"Name",Name);
dini_Set(file,"Ip",Ip);
dini_IntSet(file,"Registered",-1);
dini_IntSet(file,"Password",0);
dini_IntSet(file,"Level",0);
dini_IntSet(file,"Wired",0);
dini_IntSet(file,"Jailed",0);
SendClientMessage(playerid,COLOUR_ORANGE,"Your username is not recognized on this server. Please /register to continue.");
}
strcat(gPlayerInfo[playerid][PLAYER_NAME], dini_Get(file,"Name"));
strcat(gPlayerInfo[playerid][PLAYER_IP], dini_Get(file,"Ip"));
gPlayerInfo[playerid][PLAYER_REGGED] = dini_Int(file,"Registered");
gPlayerInfo[playerid][PLAYER_PASS] = dini_Int(file,"Password");
gPlayerInfo[playerid][PLAYER_LEVEL] = dini_Int(file,"Level");
gPlayerInfo[playerid][PLAYER_WIRED] = dini_Int(file,"Wired");
gPlayerInfo[playerid][PLAYER_JAILED] = dini_Int(file,"Jailed");
if(gPlayerInfo[playerid][PLAYER_REGGED] == 0) SendClientMessage(playerid,COLOUR_ORANGE,"You're username is recognised on this server, but you have not registered. Please /register to continue.");
else if(gPlayerInfo[playerid][PLAYER_REGGED] == 1) SendClientMessage(playerid,COLOUR_ORANGE,"You're username is recognised on this server. Please /login to continue.");
gPlayerInfo[playerid][PLAYER_REGGED] = 0;
return 1;
}
if(gPlayerInfo[playerid][PLAYER_REGGED] == 0)
SendClientMessage(playerid,COLOUR_ORANGE,"You're username is recognised on this server, but you have not registered. Please /register to continue.");
return 1;
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid, COLOR_RED, "GoodBye!");
SendClientMessageToAll(COLOR_RED, "A Player Left The Server!");
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}