18.01.2011, 13:18
When I try to compile this piece of code(yes its part of unfinished adminscript but should work to compile) :
I get this error code:
I dont get these.
Help please
Код:
#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 COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_ORANGE 0xFF9900AA #define PlayerFile "Adminscript/Users/%s.ini" #define SettingFile "Adminscript/Settings/MainSettings.ini" #define CommandFile "Adminscript/Settings/Commands.ini" public OnFilterScriptInit() { print("\n************************************"); print("* Admin Filterscript By Max Coldheart"); 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 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,COLOR_ORANGE,"(INFO) You Havent Registered Yet. Please Use /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,COLOR_ORANGE,"You're username is recognized but not registered on the server. Please use /register to continue."); else if(gPlayerInfo[playerid][PLAYER_REGGED] == 1) SendClientMessage(playerid,COLOR_ORANGE,"You're username is registered. Please use /login to continue."); gPlayerInfo[playerid][PLAYER_REGGED] = 0; return 1;
Код:
C:\Users\Max\Desktop\GTA San Andreas\samp03csvr_win32\filterscripts\Admin.pwn(44) : error 001: expected token: ";", but found "-identifier-" C:\Users\Max\Desktop\GTA San Andreas\samp03csvr_win32\filterscripts\Admin.pwn(54) : error 017: undefined symbol "dini_Intset" C:\Users\Max\Desktop\GTA San Andreas\samp03csvr_win32\filterscripts\Admin.pwn(56) : error 037: invalid string (possibly non-terminated string) C:\Users\Max\Desktop\GTA San Andreas\samp03csvr_win32\filterscripts\Admin.pwn(56) : error 017: undefined symbol "Wired" C:\Users\Max\Desktop\GTA San Andreas\samp03csvr_win32\filterscripts\Admin.pwn(56) : error 029: invalid expression, assumed zero C:\Users\Max\Desktop\GTA San Andreas\samp03csvr_win32\filterscripts\Admin.pwn(56) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
Help please