Hi, ich habe ein Problem mit meinem Script. Nachdem ich das Register/login System gescriptet habe kamen so um die 4 Errors. Könnt ihr mir vieleicht sagen woran es liegen könnte ?
ZitatAlles anzeigen
#include <a_samp>
#include <Dini>
#define DIALOG_BSN 1
#define GRAU 0xC0C0C0FF
#define WEISS 0xFFFFFFFF
#define ROT 0xFF0000FF
#define GRÜN 0x80FF00FF
#define BLAU 0x0000FFFF
#define ORANGE 0xFF8000FF
#define VIOLETT 0x400080FF
#define SCHWARZ 0x000000FF
#define DIALOG_REGISTER 2
#define DIALOG_LOGIN 3
new bsnenter;
new bsnexit;
main()
{
print("\n----------------------------------");
print("RealLifeServer");
print("----------------------------------\n");
}
public OnGameModeInit()
{
UsePlayerPedAnims();
bsnexit=CreatePickup(1559,1,362.9673,-75.2629,1001.5078);
bsnenter=CreatePickup(1559,1,1199.2792,-918.1400,43.1231);
Create3DTextLabel("Burger Shot\n Eingang",0xFF0000FF,362.9673,-75.2629,1001.5078,10,0);
DisableInteriorEnterExits();
SetGameModeText("eXtremeRealLife");
AddPlayerClass(0,-1984.6086,137.6134,27.6875,92.3387,0,0,0,0,0,0);
AddPlayerClass(1,-1984.6086,137.6134,27.6875,92.3387,0,0,0,0,0,0);
AddStaticVehicle(462,-1981.8754,115.5143,27.2797,116.1930,14,14); // Roller1
AddStaticVehicle(462,-1982.2548,117.3248,27.2797,115.5048,14,14); // Roller2
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,-1973.3068,-0.5297,34.9476);
SetPlayerFacingAngle(playerid,61.3184);
SetPlayerCameraPos(playerid,-1976.6879,1.0854,34.8228);
SetPlayerCameraLookAt(playerid,-1973.3068,-0.5297,34.9476);
return 1;
}
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","GIbt bitte nun das gewünschte Passwort ein:","Register","Abbrechen");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/gotobsn",true)==0)
{
ShowPlayerDialog(playerid,DIALOG_BSN,DIALOG_STYLE_MSGBOX,"BSN","Möchten sie sich wirklich zum Burger Shot LS teleportieren?","Ja","Nein");
return 1;
}
if(strcmp(cmdtext,"/kill",true)==0)
{
SetPlayerHealth(playerid,0);
return 1;
}
if (strcmp(cmdtext,"/gmx",true)==0)
{
SendRconCommand("gmx");
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)
{
if(pickupid==bsnenter)
{
SetPlayerPos(playerid,369.7374,-72.2900,1001.5078);
SetPlayerInterior(playerid,10);
GameTextForPlayer(playerid,"~w~Du hast den Burger Shot betreten",3000,3);
}
if (pickupid==bsnexit)
{
SetPlayerPos(playerid,1199.4618,-920.8215,43.1059);
SetPlayerFacingAngle(playerid,185.7090);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
}
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==2)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen!");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,ROT,"Das Passwort war nicht lang genug!");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","GIbt bitte nun das gewünschte Passwort ein:","Register","Abbrechen");
}
else
{
Register(playerid,inputtext))
return 1;
}
}
if(dialogid==DIALOG_BSN)
{
if(response==1)
{
SetPlayerPos(playerid,1215.4904,-920.1511,42.9232);
SendClientMessage(playerid,0xFFFF00FF,"Du hast dich zum Burger Shot LS teleportiert!");
}
if(response==0)
{
SendClientMessage(playerid,0xFF8000FF,"OK, dann halt nicht ...");
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock Register(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_Create(Spielerdatei);
dini_Set(Spielerdatei,"Passwort",key);
SendClientMessage(playerid,GRÜN,"Erfolgreich registriert.");
return 1;
}
Fehlermeldungen:
ZitatC:\Users\Alex\Desktop\Programme\gamemodes\alex.pwn(278) : error 017: undefined symbol "Register"
C:\Users\Alex\Desktop\Programme\gamemodes\alex.pwn(278) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Programme\gamemodes\alex.pwn(278 -- 279) : warning 215: expression has no effect
C:\Users\Alex\Desktop\Programme\gamemodes\alex.pwn(279) : error 001: expected token: ";", but found "return"
C:\Users\Alex\Desktop\Programme\gamemodes\alex.pwn(279) : fatal error 107: too many error messages on one line
Danke IM Voraus !