09.12.2014, 20:55
Please help me! I don't know how fix this !
Error code :
Here is all:
Please help! Bye!
Error code :
Код:
C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(99) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(100) : error 017: undefined symbol "SetupPlayerForLogin" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(101) : error 017: undefined symbol "SetupPlayerForRegister" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(103) : warning 217: loose indentation C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(111) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(114) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(119) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(124) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(126) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(130) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(132) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(140) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(146) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(151) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(155) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(157) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(158) : error 017: undefined symbol "udb_hash" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(161) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(166) : error 017: undefined symbol "SetupPlayerForRegister" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(166) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(169) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(179) : error 017: undefined symbol "SetupPlayerForLogin" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(184) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(185) : error 017: undefined symbol "SetupPlayerForLogin" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(185) : error 079: inconsistent return types (array & non-array) C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(187) : error 017: undefined symbol "pName" C:\Users\Milos\Desktop\uydhuhsauhygduas\gamemodes\SHRP.pwn(188) : error 017: undefined symbol "udb_hash" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
Код:
//=============================================================================> #include #include <a_samp> #include <dini> //==============================================================================> define i new #define SERVER_NAME "StayHere RolePlay " #define SERVER_SCRIPT "#Mikki" #define SERVER_VERSION "v1.0 Alpha" #define LAST_UPDATE "09/12/2014" #define MOTO " ''Ja se ne predajem ni onda kada mi ladje potonu.'' " #define REGISTER_DIALOG_RULES 1 #define REGISTER_DIALOG_GODINE 2 #define REGISTER_DIALOG_POL 3 #define REGISTER_DIALOG_PASSWORD 4 #define REGISTER_DIALOG_END 5 #define LOGIN_DIALOG_PASSWORD 6 #define MAX_LOGIN_FAILS 3 #undef MAX_PLAYERS #define MAX_PLAYERS 100 //------------------------------------------------------------------------------Boje #define BELA "{FFFFFF}" #define ZELENA "{008000}" #define CRVENA "{FF0000}" #define JCRVENA "{F81414}" #define SPLAVA "{29fcff}" #define GLAVNA "{EEC111}" #define ZUTA "{F3FF02}" #define ORANGE "{FFA500}" #define ZPLAVA "{22C7F5}" #define PLAVA "{0000FF}" #define ROZA "{FF00FF}" #define CMDC "{B8FF02}" #define SERVER "{AFE7FF}" #define SZELENA "{00FF00}" #define LJUB "{800080}" #define SIVA "{C0C0C0}" #define CRVENA2 "{FF6347}" #define PPLAVA "{0084e3}" #define SCRV2 "{FF6347}" #define DRCC "{800080}" #define HZELENA "{04CC29}" #define LOCOS 0xFFA500C8 #define AZUTA 0xFFA500C8 #define BELA2 0xFFFFFFAA #define PROX 0xC2A2DAAA #define SCRVENA 0xFF6347AA #define COLOR_GRAD2 0xBFC0C2FF #define TEAM_HIT_COLOR 0xFFFFFF00 #define COLOR_GREY 0xAFAFAFAA #define COLOR_YELLOW 0xFFFF00AA #define RED_ZONE 0xFF000065 #define DRC_ZONE 0x80008065 #define LOCOS_ZONE 0xFFA50065 #define COLOR_RED 0xAA3333AA #define COLOR_LIGHTRED 0xFF6347AA #define SVETLOPLAVA 0x33CCFFAA #define GREEN 0x21DD00FF //=============================================================================> main main() { print(" "); printf("--------------------------------------"); printf(" [SH:RP] %s", SERVER_NAME); printf(" Naskriptao: %s", SERVER_SCRIPT); printf(" Server verzija: %s", SERVER_VERSION); printf(" Poslednji update: %s", LAST_UPDATE); printf(" Moto: %s", MOTO); printf("--------------------------------------"); print(" "); } //=============================================================================> enum i news enum registration { Player_Godine, // Govori koliko igrac ima godina Player_Lozinka[24], // Govori o passwordu Player_Pol, Player_Skin, } new rInfo[MAX_PLAYERS][registration]; //=============================================================================> CallBack-ovi public OnGameModeInit() { AddPlayerClass(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return 1; } public OnPlayerConnect(playerid) { SetPVarInt(playerid, "ulogovan", 0); //Govori da li je igrac ulogovan? SetPVarInt(playerid, "godine", -1); SetPVarInt(playerid, "pol", -1); SetPVarInt(playerid, "skin", -1); SetPVarInt(playerid, "login_fail", 0); //------------------------------------------------------------------------------ new str[64]; format(str, sizeof(str), "/Korisnici/%s.ini", pName(playerid)); if(!dini_Exists(str)) { SetupPlayerForLogin(playerid); }else{ SetupPlayerForRegister(playerid); } return 1;} //============================================================================ > OnDialogResponse public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { SetPVarInt(playerid, "dialog", 0); //Dialog za prihvatiti pravila restracija if(dialogid == REGISTER_DIALOG_RULES) { if(!response) return Kick(playerid); new str[64], str2[128]; format(str, sizeof(str), ""SPLAVA"%s - Godine", SERVER_NAME); format(str2, sizeof(str2), ""SPLAVA"%s,\nupisi koliko imas godina:", pName(playerid)); ShowPlayerDialog(playerid, REGISTER_DIALOG_GODINE, DIALOG_STYLE_INPUT, str, str2, "Dalje", "Odustani"); //-------------------------------------------------------------------------- //Dialog za upisati godine na registraciji }else if(dialogid == REGISTER_DIALOG_GODINE) { if(!response) return Kick(playerid); new godine = strval(inputtext); if(!strlen(inputtext)) { new str[64], str2[128]; format(str, sizeof(str), ""SPLAVA"%s - Godine", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nupisi koliko imas godina:", pName(playerid)); ShowPlayerDialog(playerid, REGISTER_DIALOG_GODINE, DIALOG_STYLE_INPUT, str, str2, "Dalje", "Odustani"); return 1; } if(godine < 10 || godine > 80) { new str[64], str2[128]; format(str, sizeof(str), ""SPLAVA"%s - Godine", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nupisi koliko imas godina\n\n"CRVENA"Ne mozes imati manje od 10 a vise od 80 godina!", pName(playerid)); ShowPlayerDialog(playerid, REGISTER_DIALOG_GODINE, DIALOG_STYLE_INPUT, str, str2, "Dalje", "Odustani"); return 1; } rInfo[playerid][Player_Godine] = godine; new str[64]; format(str, sizeof(str), ""SPLAVA"%s - Pol", SERVER_NAME); ShowPlayerDialog(playerid, REGISTER_DIALOG_POL, DIALOG_STYLE_LIST, str, "Musko\nZensko", "Dalje", "Odustani"); //-------------------------------------------------------------------------- //Dialog za izabrati spol na registraciji }else if(dialogid == REGISTER_DIALOG_POL) { if(!response) return Kick(playerid); rInfo[playerid][Player_Pol] = listitem; if(listitem == 0) { rInfo[playerid][Player_Skin] = 2; }else if(listitem == 1) { rInfo[playerid][Player_Skin] = 12; } new str[64], str2[128]; format(str, sizeof(str), ""SPLAVA"%s - Lozinka", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nupisi lozinku:", pName(playerid)); ShowPlayerDialog(playerid, REGISTER_DIALOG_PASSWORD, DIALOG_STYLE_INPUT, str, str2, "Dalje", "Odustani"); //-------------------------------------------------------------------------- //Dialog za upisati lozinku na registraciji }else if(dialogid == REGISTER_DIALOG_PASSWORD) { if(!response) return Kick(playerid); if(!strlen(inputtext) || (strlen(inputtext) < 5 || strlen(inputtext) > 20)) { new str[64], str2[128]; format(str, sizeof(str), ""SPLAVA"%s - Lozinka", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nupisi lozinku:\n\n"CRVENA"Lozinka mora imati\nizmedu 5 i 20 znakova !", pName(playerid)); ShowPlayerDialog(playerid, REGISTER_DIALOG_PASSWORD, DIALOG_STYLE_INPUT, str, str2, "Dalje", "Odustani"); return 1; } rInfo[playerid][Player_Lozinka] = udb_hash(inputtext); new str[64], str2[256]; format(str, sizeof(str), ""SPLAVA"%s - Kraj", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nupisani podatci:\n\n"SPLAVA"Ime:"BELA"%s\n"SPLAVA"Lozinka:"BELA"%s\n"SPLAVA"Godine:"BELA"%d"SPLAVA"\nSpol:"BELA"%s\n\nUkoliko su upisani podatci tocni\nklikni dalje, ukoliko nisu klikni\nna ponovi !", pName(playerid), pName(playerid), inputtext, rInfo[playerid][Player_Godine], GetPolName(rInfo[playerid][Player_Pol])); ShowPlayerDialog(playerid, REGISTER_DIALOG_END, DIALOG_STYLE_MSGBOX, str, str2, "Registriraj", "Ponovi"); //-------------------------------------------------------------------------- //Dialog za zavrsiti registraciju ili je ponoviti }else if(dialogid == REGISTER_DIALOG_END) { if(!response) return SetupPlayerForRegister(playerid); //Stvaramo file u koji cemo spremiti igracu statistiku new str[64]; format(str, sizeof(str), "/Korisnici/%s.ini", pName(playerid)); dini_Create(str); //---------------------------------------------------------------------- //Stvaramo statisktiu koju upisujemo igracu u file (//STATISTIKA) dini_IntSet(str, "password", rInfo[playerid][Player_Lozinka]); dini_IntSet(str, "godine", rInfo[playerid][Player_Godine]); dini_IntSet(str, "pol", rInfo[playerid][Player_Pol]); dini_IntSet(str, "skin", rInfo[playerid][Player_Skin]); //---------------------------------------------------------------------- //Prikazujemo igracu dilaog da se logira SetupPlayerForLogin(playerid); //---------------------------------------------------------------------- //-------------------------------------------------------------------------- //Dialog za upisati lozinku na loginu }else if(dialogid == LOGIN_DIALOG_PASSWORD) { if(!response) return Kick(playerid); if(!strlen(inputtext)) return SetupPlayerForLogin(playerid); new str[64]; format(str, sizeof(str), "/Korisnici/%s.ini", pName(playerid)); if(udb_hash(inputtext) != dini_Int(str, "password")) { SetPVarInt(playerid, "login_fail", GetPVarInt(playerid, "login_fail")+1); if(GetPVarInt(playerid, "login_fail") == MAX_LOGIN_FAILS) return Kick(playerid); SetupPlayerForLogin(playerid); }else{ LoginPlayer(playerid); return 1; } //-------------------------------------------------------------------------- return 1; } stock pName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; } //------------------------------------------------------------------------------ //============================================================================== stock SetupPlayerForLogin(playerid) { new str[64], str2[128]; format(str, sizeof(str), ""SPLAVA"%s - Logovanje", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nDobrodosao nazag na server !\n\nKako bi nastavio s igrom molimo\nte upisi lozinku:", pName(playerid)); ShowPlayerDialog(playerid, LOGIN_DIALOG_PASSWORD, DIALOG_STYLE_PASSWORD, str, str2, "Prijava", "Odustani"); return 1; } //------------------------------------------------------------------------------ stock SetupPlayerForRegister(playerid) { new str[64], str2[256]; format(str, sizeof(str), ""SPLAVA"%s - Pravila", SERVER_NAME); format(str2, sizeof(str2), ""BELA"%s,\nDobrodosao na nas server! \n\nKako bi igrao moras prihvatiti\ndole navedena pravila:\n\n1. Zabranjeno vredjanje!\n2. Zabranjen DM (Stroga kazna!)\n3. Zabranjeno iskoriscavanje BUG-ova (Stroga kazna!)\n4. Zabranjeno varanje (Stroga kazna!)\n\nDa li prihvatas navedena pravila?", pName(playerid)); ShowPlayerDialog(playerid, REGISTER_DIALOG_RULES, DIALOG_STYLE_MSGBOX, str, str2, "Prihvatam", "Odbijam"); return 1; } //============================================================================ > Fnkcija za dobiti ime spola igraca stock GetSexName(sex) { new str[12]; if(sex == 0) { format(str, sizeof(str), "Musko"); }else if(sex == 1) { format(str, sizeof(str), "Zensko"); } return str; } //=============================================================================> LoginPlayer - funkcija stock LoginPlayer(playerid) { new str[64]; format(str, sizeof(str), "/Korisnici/%s.ini", pName(playerid)); //Ucitavamo igracevu statistiku (//STATISTIKA) SetPVarInt(playerid, "is_logged", 1); SetPVarInt(playerid, "godine", dini_Int(str, "godine")); SetPVarInt(playerid, "pol", dini_Int(str, "pol")); SetPVarInt(playerid, "skin", dini_Int(str, "skin")); //-------------------------------------------------------------------------- //Namjestavamo igracu ostale stvari na serveru SetPlayerSkin(playerid, GetPVarInt(playerid, "skin")); //-------------------------------------------------------------------------- //Saljemo igracu poruku da se uspjesno logirao na server new str2[128]; ClearText(playerid); format(str2, sizeof(str2), ""SPLAVA"%s"BELA", dobrodosao na %s !", pName(playerid), SERVER_NAME); SendClientMessage(playerid, -1, str2); SendClientMessage(playerid, -1, ""BELA"Uspesno si se ulogovao, zelimo ti ugodnu igru !"); SendClientMessage(playerid, -1, ""BELA"Zeli ti SH:RP Admin team!"); //-------------------------------------------------------------------------- return 1; } //============================================================================ > ClearText - funkcija koja igracu brise chat stock ClearText(playerid) { for(new i=0;i<100;i++) { SendClientMessage(playerid, -1, ""BELA" "); } return 1; } //============================================================================ > udb_hash stock udb_hash(buf[]) { new length=strlen(buf), s1 = 1, s2 = 0, n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; }