Hallo Com,
Ich habe mich jetzt mal an einen Reallife Gamemode gesetzt, und bisher hat auch alles fehlerfrei funktioniert.
Jetzt habe ich versucht ein Register/Login System in mein Script einzuscripten...
Ich habe nach einem Video gearbeitet: Das viedeo war von MrMonatTutorial.
Ich bekomme jetzt immer wieder 6 Errors, kann mir da vieleicht einer sagen was ich dagegen machen kann ?
Hier die Kopie des Scripts:
//Reallife Gamemode by MaZze (TestScript)(TG-Reallife)
#include <a_samp>
#include <dini>
//Farben
#define GELB 0xFFF000FF
#define GRÜN 0x00FF1EFF
#define ROT 0xFF0005FF
#define BLAU 0x0023FFFF
//Dialoge
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
main()
{
print("\n----------------------------------");
print(" Reallife Gamemode by MaZze");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("TG-Reallife");
AddPlayerClass(2,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(7,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(15,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(19,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(20,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(21,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(22,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(23,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(24,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(25,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(26,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddPlayerClass(29,1098.3600,-1189.0768,18.3446,181.8014,1,0,0,0,0,0);
AddStaticVehicle(586,1097.1224,-1202.8499,17.3249,266.0672,0,1); // SpawnCar
AddStaticVehicle(596,1558.8671,-1711.3867,5.6108,0.1927,79,1); // LSPD Auto
AddStaticVehicle(596,1562.6902,-1711.3770,5.6116,0.0413,79,1); // LSPD Auto
AddStaticVehicle(596,1566.4706,-1711.4098,5.6121,0.3732,79,1); // LSPD Auto
AddStaticVehicle(596,1570.3752,-1711.3789,5.6115,0.7356,79,1); // LSPD Auto
AddStaticVehicle(596,1574.2659,-1711.3875,5.6117,359.9133,79,1); // LSPD Auto
AddStaticVehicle(596,1578.6941,-1711.4043,5.6116,0.1332,79,1); // LSPD Auto
AddStaticVehicle(596,1583.4611,-1711.4275,5.6114,359.7557,79,1); // LSPD Auto
AddStaticVehicle(596,1587.4811,-1710.9625,5.6109,359.7114,79,1); // LSPD Auto
AddStaticVehicle(596,1591.4379,-1711.0571,5.6107,359.8351,79,1); // LSPD Auto
AddStaticVehicle(596,1595.3746,-1710.7952,5.6114,359.7811,79,1); // LSPD Auto
AddStaticVehicle(599,1601.6379,-1704.3829,6.0822,90.6994,79,1); // LSPD Ranger
AddStaticVehicle(599,1601.6655,-1700.1825,6.0806,90.9288,79,1); // LSPD Ranger
AddStaticVehicle(599,1601.7185,-1696.0016,6.0814,89.6707,79,1); // LSPD Ranger
AddStaticVehicle(599,1601.8536,-1692.0183,6.0791,90.0069,79,1); // LSPD Ranger
AddStaticVehicle(599,1601.7878,-1687.8853,6.0804,89.1605,79,1); // LSPD Ranger
AddStaticVehicle(599,1601.8666,-1683.7999,6.0794,89.1858,79,1); // LSPD Ranger
AddStaticVehicle(523,1583.8899,-1666.2642,5.4640,270.0138,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.8074,-1668.3905,5.4642,269.4769,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.6688,-1670.4379,5.4621,268.2184,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.5133,-1672.6479,5.4637,267.6314,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.4559,-1674.5785,5.4633,268.8782,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.3690,-1676.4003,5.4648,269.8356,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.2047,-1678.3610,5.4666,267.4774,79,1); // LSPD Motorrad
AddStaticVehicle(523,1583.0957,-1680.6555,5.4670,268.4315,79,1); // LSPD Motorrad
AddStaticVehicle(427,1526.5192,-1644.8463,6.0224,179.9884,79,1); // LSPD Truck
AddStaticVehicle(427,1530.6454,-1644.9036,6.0225,179.4203,79,1); // LSPD Truck
AddStaticVehicle(427,1534.7166,-1644.9388,6.0226,179.3542,79,1); // LSPD Truck
AddStaticVehicle(427,1538.8528,-1644.9532,6.0225,180.7118,79,1); // LSPD Truck
AddStaticVehicle(601,1529.0128,-1688.0573,5.6494,269.6231,79,1); // LSPD Wasserwerfer
AddStaticVehicle(601,1529.0039,-1683.9045,5.6494,269.5882,79,1); // LSPD Wasserwerfer
AddStaticVehicle(528,1545.4198,-1651.0028,5.9328,90.0536,79,1); // LSPD Panzerwagen
AddStaticVehicle(528,1545.4749,-1655.1512,5.9338,90.5158,79,1); // LSPD Panzerwagen
AddStaticVehicle(528,1545.5183,-1659.1449,5.9341,89.5940,79,1); // LSPD Panzerwagen
AddStaticVehicle(528,1545.5167,-1663.0665,5.9343,89.2325,79,1); // LSPD Panzerwagen
AddStaticVehicle(560,1545.1573,-1684.5410,5.5954,90.1165,0,0); // LSPD Leader Auto
AddStaticVehicle(560,1545.0817,-1680.4530,5.5959,90.1996,0,0); // LSPD Leader Auto
AddStaticVehicle(560,1545.2075,-1676.0239,5.5955,90.8920,0,0); // LSPD Leader Auto
AddStaticVehicle(416,1095.6969,-1330.0237,13.3124,1.3542,1,3); // Krankenwagen
AddStaticVehicle(416,1109.0009,-1329.8972,13.3234,0.9995,1,3); // Krankenwagen
AddStaticVehicle(416,1121.9253,-1330.0255,13.3127,359.7513,1,3); // Krankenwagen
AddStaticVehicle(416,1177.6602,-1339.3065,14.0598,270.2294,1,3); // Krankenwagen
AddStaticVehicle(416,1177.4153,-1308.6942,14.0110,269.8778,1,3); // Krankenwagen
AddStaticVehicle(560,1100.0996,-1330.9948,12.7840,0.9393,3,3); // Krankenwagen
AddStaticVehicle(560,1112.9684,-1330.4728,12.8278,0.6559,3,3); // Krankenwagen
AddStaticVehicle(560,1126.2322,-1331.2400,12.7637,359.6274,3,3); // Krankenwagen
AddStaticVehicle(560,1182.3585,-1332.2025,13.2865,0.2623,3,3); // Krankenwagen
AddStaticVehicle(560,1182.0438,-1314.7343,13.2766,180.0305,3,3); // Krankenwagen
AddStaticVehicle(409,1244.3678,-2031.3295,59.6739,180.9899,0,0); // Präsidenten Limo
AddStaticVehicle(405,1244.3875,-2039.7745,59.7483,179.6671,0,0); // Prsidenten Auto
AddStaticVehicle(405,1244.2421,-2023.2681,59.7525,180.1854,0,0); // Prsidenten Auto
AddStaticVehicle(482,1250.3700,-2010.2039,59.8136,180.1655,0,0); // Prsidenten Auto
AddStaticVehicle(482,1269.9026,-2010.1840,59.2565,179.4250,0,0); // Prsidenten Auto
AddStaticVehicle(477,1260.0741,-2010.3088,59.1735,179.7888,0,0); // Prsidenten Auto
AddStaticVehicle(582,1669.6654,-1699.9844,20.5450,123.9493,1,30); // News Truck
AddStaticVehicle(582,1669.3672,-1716.3468,20.5422,55.5910,1,30); // News Truck
AddStaticVehicle(582,1670.0468,-1707.5082,20.5395,91.4487,1,30); // News Truck
AddStaticVehicle(582,1649.7040,-1698.7145,20.5287,227.6872,1,30); // News Truck
AddStaticVehicle(582,1647.6514,-1705.0072,20.5393,226.2507,1,30); // News Truck
AddStaticVehicle(582,1666.5927,-1694.0554,15.6668,90.9658,1,30); // News Truck
AddStaticVehicle(582,1666.6445,-1704.3489,15.6676,91.5764,1,30); // News Truck
AddStaticVehicle(582,1666.5667,-1713.9196,15.6664,92.6757,1,30); // News Truck
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2138.0220,843.2205,15.2753);
SetPlayerCameraPos(playerid, 2150.2930,843.3586,13.9589);
SetPlayerCameraLookAt(playerid, 2138.0220,843.2205,15.2753);
SetPlayerFacingAngle(playerid,268.7638);
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,GELB,"Willkommen auf dem Server TG-Reallife");
SendClientMessage(playerid,GRÜN,"Schau doch mal auf unser Forum: TG-Reallife.tk");
SendClientMessage(playerid,ROT,"Oder komm doch zu uns auf den TS3: 134.255.237.6:9960");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib hier bitte dein gewünschtes Passwort ein:","Register","Abbrechen");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid,GRÜN,"Du wurdest gespawnt");
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("/mycommand", cmdtext, true, 10) == 0)
{
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==DIALOG_REGISTER)
{
if(response==0)
{
SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen.");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,BLAU,"Das Passwort ist zu kurz.");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib hier bitte dein gewünschtes Passwort ein:","Register","Abbrechen");
return 1;
}
else
{
Register(playerid,inputtext);
}
return 1;
{
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source);
{
return 1;
}
stock Register(playerid,key())
{
return 1;
}
Denkt euch nichts ... Es ist bis auf den Spawn / Die Autos noch nichts verändert weil ich erst seit gestern an diesem Script sitze und mich noch nie zuvor mit dem Scripten auseinandergesetzt haben.
Ich hoffe mir kann als Antwort unter meinen Beitrag jemand die Fehler erklären, bzw mir genau sagen was ich machen muss. (Der Fehlererklärbär hilft mir nicht da ich nicht weis was der meint).
Hier nochmal die 6 Error Codes:
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(316 ) : error 017: undefined symbol "Register"
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(318 ) : warning 217: loose indentation
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(319 ) : warning 225: unreachable code
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(322 ) : warning 225: unreachable code
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(322 ) : warning 217: loose indentation
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(322 ) : error 029: invalid expression, assumed zero
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(322 ) : error 004: function "OnPlayerClickPlayer" is not implemented
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(327 ) : warning 225: unreachable code
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(327 ) : error 029: invalid expression, assumed zero
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(327) : error 017: undefined symbol "Register"
C:\Users\Matthias\Desktop\GTA San Andreas Testserver\gamemodes\TGR.pwn(332) : error 030: compound statement not closed at the end of file (started at line 30 8 )
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Vielen Dank im vorraus !