20.01.2013, 13:32
Hello,
Whenever i try to compile my script it keeps telling me this:
But i defined everything!
This is my script:
I used this tutorial for the login:
https://sampforum.blast.hk/showthread.php?tid=352703
Please help me!
Whenever i try to compile my script it keeps telling me this:
Код:
C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(120) : error 017: undefined symbol "Path" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(122) : error 017: undefined symbol "Path" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(123) : error 017: undefined symbol "dlogin" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(127) : error 017: undefined symbol "dregister" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(300) : error 017: undefined symbol "dregister" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(307) : error 017: undefined symbol "dregister" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(312) : error 017: undefined symbol "Path" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(332) : warning 217: loose indentation C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(332) : error 017: undefined symbol "dlogin" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(339) : error 017: undefined symbol "pInfo" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(339) : warning 215: expression has no effect C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(339) : error 001: expected token: ";", but found "]" C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(339) : error 029: invalid expression, assumed zero C:\Users\Riekelt\Desktop\Jailbreak\gamemodes\jailbreak.pwn(339) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
This is my script:
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #include <YSI\y_ini> #include <zcmd> #include <sscanf2> native WP_Hash(buffer[],len,const str[]); #if defined FILTERSCRIPT /* ENUM Player*/ enum pInfo { pPass[129], pKills, pEscaped, pGaurdLevel, pAdminLevel, pBanned, pBanReason, pMoney, pWarnCount, pKickCount, pBanCount, pCaughtCount, pCheatCount } new PlayerInfo[MAX_PLAYERS][pInfo]; /* Colors */ #define COL_WHITE "{FFFFFF}" #define COL_RED "{F81414}" #define COL_GREEN "{00FF22}" #define COL_LIGHTBLUE "{00CED1}" #define dregister 1 #define dlogin 2 #define Path "users/%s.ini" /* Dialogs */ /* Shit You don't need to touch */ stock Path(playerid) { new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(str,sizeof(str),Path,name); return str; } forward loadaccount_user(playerid, name[], value[]); public loadaccount_user(playerid, name[], value[]) { INI_String("Password", pInfo[playerid][pPass],129); INI_Int("Kills",pInfo[playerid][pKills]); INI_Int("EscapeCount",pInfo[playerid][pEscaped]); INI_Int("GaurdLevel",pInfo[playerid][pGaurdLevel]); INI_Int("AdminLevel",pInfo[playerid][pAdminLevel]); INI_Int("Banned",pInfo[playerid][pBanned]); INI_Int("BanReason",pInfo[playerid][pBanReason]); INI_Int("Money",pInfo[playerid][pMoney]); INI_Int("WarnCount",pInfo[playerid][pWarnCount]); INI_Int("KickCount",pInfo[playerid][pKickCount]); INI_Int("BanCount",pInfo[playerid][pBanCount]); INI_Int("CaughtCount",pInfo[playerid][pCaughtCount]); INI_Int("CheatCount",pInfo[playerid][pCheatCount]); return 1; } public OnFilterScriptInit() { print("\n-------------------------------------------"); print(" Jailbreak Server - Made by: Riekelt"); print("-------------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n------------------------------------------"); print(" Jailbreak Server - Made by: Riekelt"); print("------------------------------------------\n"); } #endif public OnGameModeInit() { SetGameModeText("Jailbreak 0.1"); 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)); if(fexist(Path(playerid))) { INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back! Please login with your account!","Login","Quit"); } else { ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! Uhoh! What is that? /n You are not registered! Please register to play!","Register","Quit"); return 1; } return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { 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 == dregister) { if(!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) { ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.\nPlease enter the password!","Register","Quit"); return 1; } new hashpass[129]; WP_Hash(hashpass,sizeof(hashpass),inputtext); new INI:file = INI_Open(Path(playerid)); INI_SetTag(file,"PlayerData"); INI_WriteString(file,"Password",hashpass); INI_WriteInt(file,"Kills",0); INI_WriteInt(file,"EscapeCount",0); INI_WriteInt(file,"AdminLevel",0); INI_WriteInt(file,"Banned",0); INI_WriteInt(file,"BanReason",0); INI_WriteInt(file,"Money",0); INI_WriteInt(file,"WarnCount",0); INI_WriteInt(file,"KickCount",0); INI_WriteInt(file,"BanCount",0); INI_WriteInt(file,"BanCount",0); INI_WriteInt(file,"CaughtCount",0); INI_WriteInt(file,"CheatCount",0); INI_Close(file); SendClientMessage(playerid,-1,"You have been successfully registered"); return 1; } } if(dialogid == dlogin) { if(!response) return Kick(playerid); if(response) { new hashpass[129]; WP_Hash(hashpass,sizeof(hashpass),inputtext); if(!strcmp(hashpass,pInfo[playerid][Password])) { INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid); SetPlayerScore(playerid,pInfo[playerid][Kills]); GivePlayerMoney(playerid,pInfo[playerid][Money]); SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in"); } else { ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account.\nIncorrect password!","Login","Quit");//We will tell to them that they've entered an incorrect password return 1; } } } return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; }
https://sampforum.blast.hk/showthread.php?tid=352703
Please help me!