und wie mache ich das dort ich meine kenne das plugin aber nicht wie es genau da geht
[SAMMELTHREAD] Kleine Scripting Fragen
- Rafelder
- Unerledigt
Dein Problem konnte durch einen User gelöst werden? Bedank dich bei ihm indem du seinen Beitrag als Hilfreich markierst sowie einen Daumen oben dalässt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
public OnPlayerDisconnect(playerid, reason)
{
GetPlayerPos(playerid, SpielerInfo[playerid][pLastX], SpielerInfo[playerid][pLastY], SpielerInfo[playerid][pLastZ]);
MapAndreas_FindZ_For2DCoord(SpielerInfo[playerid][pLastX], SpielerInfo[playerid][pLastY], SpielerInfo[playerid][pLastZ]);
return true;
} -
Das jetzt so nehmen oder das mit Mapandereas ersetzen und das alte raus ?
// habs getestet falle immer noch vom himmel..
-
Füge bitte unter den Includes das ein:#pragma dynamic 100000
Erhöhe die Zahl etwas, falls die Meldung nicht weg geht, so lange, bis die Meldung im Compiler weg geht.
Trotz mehrfacher Erhöhung gleicher Fehler.
-
Code
Alles anzeigenPUBLIC:PlayerUpdate(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerNPC(playerid)) { return 1; } new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); new endstring[1600]; new var[129]; new Float: p[4]; GetPlayerPos(playerid, p[0], p[1], p[2]); GetPlayerFacingAngle(playerid, p[3]); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`Level`='%d', ", PlayerInfo[playerid][pLevel]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`AdminLevel`='%d', ", PlayerInfo[playerid][pAdmin]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Money`='%d', ", PlayerInfo[playerid][pCash]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Checkpoint`='%d', ", CCP[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`CPrison`='%d', ", xPrison[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`RunningCP`='%d', ", RunningCP[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`TeamRadar`='%d', ", TeamRadar[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BNDRadar`='%d', ", BNDRadar[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Rolex`='%d', ", PlayerInfo[playerid][pRolex]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Swissonic`='%d', ", PlayerInfo[playerid][pSwissonic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Casio`='%d', ", PlayerInfo[playerid][pCasio]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Breitling`='%d', ", PlayerInfo[playerid][pBreitling]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Nixon`='%d', ", PlayerInfo[playerid][pNixon]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`IceWatch`='%d', ", PlayerInfo[playerid][pIceWatch]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`StartCoints`='%d', ", PlayerInfo[playerid][pStartCoints]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Coints`='%d', ", PlayerInfo[playerid][pCoints]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`SpawnhealZeit`='%d', ", PlayerInfo[playerid][pSpawnhealZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DeaglespawnZeit`='%d', ", PlayerInfo[playerid][pDeaglespawnZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`M4SpawnZeit`='%d', ", PlayerInfo[playerid][pM4SpawnZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MP5SpawnZeit`='%d', ", PlayerInfo[playerid][pMP5SpawnZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MehrZinsenZeit`='%d', ", PlayerInfo[playerid][pMehrZinsenZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Medickit`='%d', ", PlayerInfo[playerid][pMedickit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Startbonus`='%d', ", PlayerInfo[playerid][pStartbonus]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Kreditkarte`='%d', ", PlayerInfo[playerid][pKreditkarte]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`KreditkarteBenutzung`='%d', ", PlayerInfo[playerid][pKreditkartebenutzen]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Personalausweis`='%d', ", PlayerInfo[playerid][pPersonalausweis]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Namechange`='%d', ", PlayerInfo[playerid][pSchongeandert]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DonateRank`='%d', ", PlayerInfo[playerid][pDonatorRank]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`UpgradePoints`='%d', ", PlayerInfo[playerid][gPupgrade]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ConnectedTime`='%d', ", PlayerInfo[playerid][pConnectTime]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Registered`='%d', ", PlayerInfo[playerid][pReg]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Sex`='%d', ", PlayerInfo[playerid][pSex]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Age`='%d', ", PlayerInfo[playerid][pAlter]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Origin`='%d', ", PlayerInfo[playerid][pOrigin]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Muted`='%d', ", PlayerInfo[playerid][pMuted]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Respect`='%d', ", PlayerInfo[playerid][pRespekt]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Gehalt`='%d', ", PlayerInfo[playerid][pGehalt]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Money`='%d', ", PlayerInfo[playerid][pCash]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Bank`='%d', ", PlayerInfo[playerid][pBank]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Jobgeld`='%d', ", PlayerInfo[playerid][pJobLohn]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Crimes`='%d', ", PlayerInfo[playerid][pCrimes]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Kills`='%d', ", PlayerInfo[playerid][pKills]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`sKills`='%d', ", PlayerInfo[playerid][psKills]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Deaths`='%d', ", PlayerInfo[playerid][pDeaths]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Arrested`='%d', ", PlayerInfo[playerid][pArrested]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ArrestTime`='%d', ", PlayerInfo[playerid][pArrestTime]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PhoneBook`='%d', ", PlayerInfo[playerid][pPhoneBook]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`LottoNr`='%d', ", PlayerInfo[playerid][pLottoNr]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Fishes`='%d', ", PlayerInfo[playerid][pFishes]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BiggestFish`='%d', ", PlayerInfo[playerid][pBiggestFish]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Job`='%d'", PlayerInfo[playerid][pJob]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring);
Wie kann ich das Ganze auf die Neuste Version der Mysql Version Updaten?
-
habs getestet falle immer noch vom himmel..
Prüfe mal, ob GetPlayerPos bei OnPlayerDisconnect überhaupt noch eine Position aus gibt. Lasse dir anschließend den Wert von Z vor und nach MapAndreas ausgeben. Möglicherweise ist das Plugin nicht richtig geladen oder initialisiert?
Trotz mehrfacher Erhöhung gleicher Fehler.
Geht die Meldung im Compiler denn weg? Falls nein, hast du eine "pawn.cfg" im pawno Ordner für den Debug Modus drin? Wenn ja, entferne diese bitte mal und versuche es dann nochmal.
Wie kann ich das Ganze auf die Neuste Version der Mysql Version Updaten?
Im Prinzip musst du nur am Ende mysql_pquery stattdessen ausführen. Die SQL Syntax bleibt ja gleich.
-
Prüfe mal, ob GetPlayerPos bei OnPlayerDisconnect überhaupt noch eine Position aus gibt. Lasse dir anschließend den Wert von Z vor und nach MapAndreas ausgeben. Möglicherweise ist das Plugin nicht richtig geladen oder initialisiert?
Geht die Meldung im Compiler denn weg? Falls nein, hast du eine "pawn.cfg" im pawno Ordner für den Debug Modus drin? Wenn ja, entferne diese bitte mal und versuche es dann nochmal.
Im Prinzip musst du nur am Ende mysql_pquery stattdessen ausführen. Die SQL Syntax bleibt ja gleich.
Ja er speichert wie voher auch als wenn ich im himmel den server verlasse spawne ich auch im himmel ander selben z cordinate
-
Geht die Meldung im Compiler denn weg? Falls nein, hast du eine "pawn.cfg" im pawno Ordner für den Debug Modus drin? Wenn ja, entferne diese bitte mal und versuche es dann nochmal
Danke! Das Problem lag tatsächlich daran, aber warum?
Allerdings bleibt der gleiche Fehler, wenn ich meinen Befehl aufrufe.Code
Alles anzeigenocmd:inventory(playerid, params[]) { new frmt[496]; for(new i=0; i < MAX_PLAYER_ITEMS; i++) { if(Items[i][itemBesitzerID] != PlayerAccount[playerid][playerDBID])continue; format(frmt, sizeof(frmt), "%s%d. Item: %s (%d) | Amount: %d | Total Weight: %0.2f\n", frmt, i+1, getItemName(Items[i][itemID]), Items[i][itemID], Items[i][itemAmount], (ItemList[Items[i][itemID]][itemlWeight]*Items[i][itemAmount])); //Items[i][itemName] } if(!strlen(frmt))return SendClientMessage(playerid, -1, "Es befinden sich keine Items in deinem Inventar."); return SendClientMessage(playerid, -1, frmt); } [debug] Run time error 5: "Invalid memory access" [debug] AMX backtrace: [debug] #0 0000821c in public ocmd_inventory (0, 339332) from script.amx [debug] #1 native CallLocalFunction () from samp-server.exe [debug] #2 000003e0 in public OnPlayerCommandText (0, 339288) from script.amx
-
Code
Alles anzeigen[00:18:17] SERVER: Der Server wurde erfolgreich gestartet [00:18:17] SERVER: Versucht die Verbindung zur Datenbank aufzubauen [00:18:17] OnGamemodeInt: LoadBiz (4ms) [00:18:17] OnGamemodeInt: LoadSBiz (2ms) [00:18:17] OnGamemodeInt: LoadTankenBiz (12ms) [00:18:17] OnGamemodeInt: LoadStuff (8ms) [00:18:17] OnGamemodeInt: LoadKassenInfo (0ms) [00:18:17] OnGamemodeInt: LoadGangfightZones (1ms) [00:18:17] OnGamemodeInt: LoadGangWarInfos (17ms) [00:18:17] OnGamemodeInt: LoadGangBNDInfos (1ms) [00:18:17] sscanf warning: String buffer overflow. [00:18:17] [debug] Run time error 5: "Invalid memory access" [00:18:17] [debug] AMX backtrace: [00:18:17] [debug] #0 002a2f68 in public UpdateHaus (120) from WB.amx [00:18:17] [debug] #1 002a380c in ?? () from WB.amx [00:18:17] [debug] #2 0013ed90 in public SSCANF_OnGameModeInit () from WB.amx [00:18:17] [debug] #3 00004c18 in public FC_OnGameModeInit () from WB.amx [00:18:17] [debug] #4 native CallLocalFunction () from samp-server.exe [00:18:17] [debug] #5 00002e80 in public OnGameModeInit () from WB.amx
Warum ist das so....
-
public UpdateHaus
Das müssten wir sehen
-
Code
Alles anzeigenPUBLIC:UpdateHaus(HausID) { new string[350], hstate[5] = "Nein", hrentstate[5] = "Nein", str[50] = "", str1[50] = ""; if(HausInfo[HausID][hLocked]) hstate = "Ja"; if(HausInfo[HausID][hRentable] == 1) hrentstate = "Ja"; if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0) strcat(str,"\n\nNutze /buyhouse um das Haus zu kaufen!"); if(HausInfo[HausID][hRentable] == 1) strcat(str1,"\nNutze /einmieten um dich einzumieten!"); format(string, 280, "%s\n\nHaus Nummer: %d\nBesitzer: %s\nVerschlossen: %s\nLevel: %d\nPreis: $%s\nMietpreis: $%s\nMietbar: %s%s%s", HausInfo[HausID][hName], HausInfo[HausID][hID], HausInfo[HausID][hOwner], hstate, HausInfo[HausID][hLevel], GetPoint(HausInfo[HausID][hPreis]), GetPoint(HausInfo[HausID][hMiete]), hrentstate, str, str1); if(IsValidDynamic3DTextLabel(HausInfo[HausID][hElement])) UpdateDynamic3DTextLabelText(HausInfo[HausID][hElement], COLOR_PICKUPS, string); else HausInfo[HausID][hElement] = CreateDynamic3DTextLabel( string, COLOR_PICKUPS, HausInfo[HausID][hausx], HausInfo[HausID][hausy], HausInfo[HausID][hausz], 10, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100 ); if(IsValidDynamicPickup(HausInfo[HausID][hPickup])) DestroyDynamicPickup(HausInfo[HausID][hPickup]); new pickupID = 1272; if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0) pickupID = 1273; HausInfo[HausID][hPickup] = CreateDynamicPickup(pickupID, 1, HausInfo[HausID][hausx], HausInfo[HausID][hausy], HausInfo[HausID][hausz], 0); return 1; }
-
Wie ist denn HausInfo deklariert?
Ganz besonders interessiert mich der 1. index, wie groß der ist..also MAX_HOUSES oder so sollte der heißen
-
new HausInfo[MAX_HAUS][hausdaten];
enum hausdaten
{
hID,
hOwner[MAX_PLAYER_NAME],
hName[50],
hLevel,
hPreis,
hMiete,
Float:hausx,
Float:hausy,
Float:hausz,
hInt,
hLocked,
hFraktion,
hRentable,
hKasse,Text3D:hElement,
hPickup,
bool:hChanged
}#define MAX_HAUS 100[pwn][/pwn]
-
Und es wird UpdateHaus mit dem index 120 aufgerufen.
Entweder du machst MAX_HAUS größer oder schaust in loadHaus nach, was da schief geht
-
Bei der Regestration:
Code[08:24:27] UPDATE `users` SET `Level`='1', `AdminLevel`='0', `Checkpoint`='0', `CPrison`='0', `RunningCP`='0', `TeamRadar`='0', `BNDRadar`='0', `Rolex`='0', `Swissonic`='0', `Casio`='0', `Breitling`='0', `Nixon`='0', `IceWatch`='0', `StartCoints`='0', `Coints`='0', `SpawnhealZeit`='0', `DeaglespawnZeit`='0', `M4SpawnZeit`='0', `MP5SpawnZeit`='0', `MehrZinsenZeit`='0', `Medickit`='0', `Startbonus`='0', `Kreditkarte`='0', `KreditkarteBenutzung`='0', `Personalausweis`='0', `Namechange`='0', `DonateRank`='0', `UpgradePoints`='0', `ConnectedTime`='0', `Registered`='1', `Sex`='0', `Age`='0', `Origin`='0', `Muted`='0', `Respect`='0', `Gehalt`='0', `Money`='5000', `Bank`='0', `Jobgeld`='0', `Crimes`='0', `Kills`='0', `sKills`='0', `Deaths`='0', `Arrested`='0', `ArrestTime`='0', `PhoneBook`='0', `LottoNr`='0', `Fishes`='0', `BiggestFish`='0', `Job`='0' WHERE `Name`='Dr.Frauenarzt' [08:24:27] UPDATE `users` SET `HeadValue`='0', `Jailed`='0', `JailTime`='0', `Leader`='-1', `Member`='-1', `Rank`='0', `Skin`='26', `Vertragszeit`='5' WHERE `Name`='Dr.Frauenarzt' [08:24:27] UPDATE `users` SET `NewsSkill`='0', `House`='0', `Mieten`='0', `HealPaket`='0', `ArmourPaket`='0', `WaffenPaket`='0', `OverHealPaket`='0', `FishSkill`='0', `MechSkill`='0', `pSHealth`='50.0', `PhoneNr`='2249', `Hotel`='-1', `Biz`='-1', `CarLic`='0', `FlyLic`='0', `BoatLic`='0', `FishLic`='0', `GunLic`='0', `Zollpass`='0' WHERE `Name`='Dr.Frauenarzt' [08:24:27] UPDATE `users` SET `Gun1`='0', `Gun2`='0', `Gun3`='0', `Gun4`='0', `Ammo1`='0', `Ammo2`='0', `Ammo3`='0', `Ammo4`='0', `CarTime`='0', `PayDay`='0', `PayDayHad`='0', `CDPlayer`='0', `AlcoholPerk`='0', `PainKillerPerk`='0', `PistolSkill`='2', `MaschinePistolSkill`='2', `SturmgewehrPistolSkill`='2', `ShotGunSkill`='1', `DrugPerk`='0', `MiserPerk`='0', `TraderPerk`='0', `Tutorial`='0', `Cptut`='0', `kh`='0', `Warnings`='0' WHERE `Name`='Dr.Frauenarzt' [08:24:27] UPDATE `users` SET `Fuel`='0', `Married`='0', `MarriedTo`='Niemand', `WantedLevel`='0', `Spawn`='0', `SavedMaterials`='0', `SavedDrugs`='0', `BikeLic`='0', `LKWLic`='0', `DonatorTime`='0', `WerberName`='Niemand', `FightingStyle`='0', `Handy`='0' WHERE `Name`='Dr.Frauenarzt' [08:24:27] UPDATE `users` SET `OnDutySkin`='60', `CarLicPoints`='0', `BikeLicPoints`='0', `InviteSperre`='0', `warntime1`='0', `warntime2`='0', `Ticketsopen`='0', `DonatorTime`='0', `OldName`='Niemand', `ClientIP`='127.0.0.1', `OrgMember`='-1', `OrgLeader`='-1', `OrgManager`='-1', `OrgName`='Keine' WHERE `Name`='Dr.Frauenarzt'
Aber es entspricht nicht der wahrheit weil überall 0 eingetragen wird.
Name Passwort stimmen überein aber der rest stimmt schon mal nicht.Wen ich mich einlogge sollte er es updaten aber macht er ja auch nicht.
Code:
Code
Alles anzeigenforward PlayerUpdate(playerid); public PlayerUpdate(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerNPC(playerid)) { return 1; } new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); new endstring[1600]; new var[129]; new Float: p[4]; GetPlayerPos(playerid, p[0], p[1], p[2]); GetPlayerFacingAngle(playerid, p[3]); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`Level`='%d', ", PlayerInfo[playerid][pLevel]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`AdminLevel`='%d', ", PlayerInfo[playerid][pAdmin]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Checkpoint`='%d', ", CCP[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`CPrison`='%d', ", xPrison[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`RunningCP`='%d', ", RunningCP[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`TeamRadar`='%d', ", TeamRadar[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BNDRadar`='%d', ", BNDRadar[playerid]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Rolex`='%d', ", PlayerInfo[playerid][pRolex]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Swissonic`='%d', ", PlayerInfo[playerid][pSwissonic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Casio`='%d', ", PlayerInfo[playerid][pCasio]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Breitling`='%d', ", PlayerInfo[playerid][pBreitling]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Nixon`='%d', ", PlayerInfo[playerid][pNixon]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`IceWatch`='%d', ", PlayerInfo[playerid][pIceWatch]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`StartCoints`='%d', ", PlayerInfo[playerid][pStartCoints]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Coints`='%d', ", PlayerInfo[playerid][pCoints]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`SpawnhealZeit`='%d', ", PlayerInfo[playerid][pSpawnhealZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DeaglespawnZeit`='%d', ", PlayerInfo[playerid][pDeaglespawnZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`M4SpawnZeit`='%d', ", PlayerInfo[playerid][pM4SpawnZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MP5SpawnZeit`='%d', ", PlayerInfo[playerid][pMP5SpawnZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MehrZinsenZeit`='%d', ", PlayerInfo[playerid][pMehrZinsenZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Medickit`='%d', ", PlayerInfo[playerid][pMedickit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Startbonus`='%d', ", PlayerInfo[playerid][pStartbonus]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Kreditkarte`='%d', ", PlayerInfo[playerid][pKreditkarte]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`KreditkarteBenutzung`='%d', ", PlayerInfo[playerid][pKreditkartebenutzen]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Personalausweis`='%d', ", PlayerInfo[playerid][pPersonalausweis]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Namechange`='%d', ", PlayerInfo[playerid][pSchongeandert]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DonateRank`='%d', ", PlayerInfo[playerid][pDonatorRank]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`UpgradePoints`='%d', ", PlayerInfo[playerid][gPupgrade]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ConnectedTime`='%d', ", PlayerInfo[playerid][pConnectTime]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Registered`='%d', ", PlayerInfo[playerid][pReg]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Sex`='%d', ", PlayerInfo[playerid][pSex]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Age`='%d', ", PlayerInfo[playerid][pAlter]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Origin`='%d', ", PlayerInfo[playerid][pOrigin]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Muted`='%d', ", PlayerInfo[playerid][pMuted]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Respect`='%d', ", PlayerInfo[playerid][pRespekt]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Gehalt`='%d', ", PlayerInfo[playerid][pGehalt]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Money`='%d', ", PlayerInfo[playerid][pCash]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Bank`='%d', ", PlayerInfo[playerid][pBank]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Jobgeld`='%d', ", PlayerInfo[playerid][pJobLohn]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Crimes`='%d', ", PlayerInfo[playerid][pCrimes]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Kills`='%d', ", PlayerInfo[playerid][pKills]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`sKills`='%d', ", PlayerInfo[playerid][psKills]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Deaths`='%d', ", PlayerInfo[playerid][pDeaths]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Arrested`='%d', ", PlayerInfo[playerid][pArrested]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ArrestTime`='%d', ", PlayerInfo[playerid][pArrestTime]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PhoneBook`='%d', ", PlayerInfo[playerid][pPhoneBook]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`LottoNr`='%d', ", PlayerInfo[playerid][pLottoNr]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Fishes`='%d', ", PlayerInfo[playerid][pFishes]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BiggestFish`='%d', ", PlayerInfo[playerid][pBiggestFish]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Job`='%d'", PlayerInfo[playerid][pJob]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring); print(endstring); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`HeadValue`='%d', ", PlayerInfo[playerid][pHeadValue]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Jailed`='%d', ", PlayerInfo[playerid][pJailed]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`JailTime`='%d', ", PlayerInfo[playerid][pJailTime]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Leader`='%d', ", PlayerInfo[playerid][pLeader]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Member`='%d', ", PlayerInfo[playerid][pMember]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Rank`='%d', ", PlayerInfo[playerid][pRank]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Skin`='%d', ", PlayerInfo[playerid][pChar]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Vertragszeit`='%d'", PlayerInfo[playerid][pVertragszeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring); print(endstring); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`NewsSkill`='%d', ", PlayerInfo[playerid][pNewsSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`House`='%d', ", PlayerInfo[playerid][pHaus]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Mieten`='%d', ", PlayerInfo[playerid][pMieten]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`HealPaket`='%d', ", PlayerInfo[playerid][pHealPaket]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ArmourPaket`='%d', ", PlayerInfo[playerid][pArmourPaket]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`WaffenPaket`='%d', ", PlayerInfo[playerid][pWaffenPaket]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`OverHealPaket`='%d', ", PlayerInfo[playerid][pOverHealPaket]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`FishSkill`='%d', ", PlayerInfo[playerid][pFishSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MechSkill`='%d', ", PlayerInfo[playerid][pMechSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`pSHealth`='%.1f', ", PlayerInfo[playerid][pSHealth]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PhoneNr`='%d', ", PlayerInfo[playerid][pNummer]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Hotel`='%d', ", PlayerInfo[playerid][pPhotelkey]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Biz`='%d', ", PlayerInfo[playerid][pBizKey]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`CarLic`='%d', ", PlayerInfo[playerid][pCarLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`FlyLic`='%d', ", PlayerInfo[playerid][pFlyLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BoatLic`='%d', ", PlayerInfo[playerid][pBoatLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`FishLic`='%d', ", PlayerInfo[playerid][pFishLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`GunLic`='%d', ", PlayerInfo[playerid][pGunLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Zollpass`='%d'", PlayerInfo[playerid][pZollpass]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring); print(endstring); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`Gun1`='%d', ", PlayerInfo[playerid][pGun1]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Gun2`='%d', ", PlayerInfo[playerid][pGun2]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Gun3`='%d', ", PlayerInfo[playerid][pGun3]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Gun4`='%d', ", PlayerInfo[playerid][pGun4]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Ammo1`='%d', ", PlayerInfo[playerid][pAmmo1]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Ammo2`='%d', ", PlayerInfo[playerid][pAmmo2]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Ammo3`='%d', ", PlayerInfo[playerid][pAmmo3]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Ammo4`='%d', ", PlayerInfo[playerid][pAmmo4]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`CarTime`='%d', ", PlayerInfo[playerid][pCarTime]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PayDay`='%d', ", PlayerInfo[playerid][pPayDay]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PayDayHad`='%d', ", PlayerInfo[playerid][pPayDayHad]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`CDPlayer`='%d', ", PlayerInfo[playerid][pCDPlayer]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`AlcoholPerk`='%d', ", PlayerInfo[playerid][pAlcoholPerk]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PainKillerPerk`='%d', ", PlayerInfo[playerid][pPainKillerPerk]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`PistolSkill`='%d', ", PlayerInfo[playerid][pPistolSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MaschinePistolSkill`='%d', ", PlayerInfo[playerid][pMaschinePistolSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`SturmgewehrPistolSkill`='%d', ", PlayerInfo[playerid][pSturmgewehrPistolSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ShotGunSkill`='%d', ", PlayerInfo[playerid][pShotGunSkill]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DrugPerk`='%d', ", PlayerInfo[playerid][pDrugPerk]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MiserPerk`='%d', ", PlayerInfo[playerid][pMiserPerk]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`TraderPerk`='%d', ", PlayerInfo[playerid][pTraderPerk]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Tutorial`='%d', ", PlayerInfo[playerid][pTut]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Cptut`='%d', ", PlayerInfo[playerid][pCPTUT]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`kh`='%d', ", PlayerInfo[playerid][pKHTIME]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Warnings`='%d'", PlayerInfo[playerid][pWarns]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring); print(endstring); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`Fuel`='%d', ", PlayerInfo[playerid][pFuel]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Married`='%d', ", PlayerInfo[playerid][pMarried]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`MarriedTo`='%s', ", PlayerInfo[playerid][pMarriedTo]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`WantedLevel`='%d', ", PlayerInfo[playerid][pWantedLevel]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Spawn`='%d', ", PlayerInfo[playerid][pSpawn]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`SavedMaterials`='%d', ", PlayerInfo[playerid][pSaveMats]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`SavedDrugs`='%d', ", PlayerInfo[playerid][pSaveDrugs]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BikeLic`='%d', ", PlayerInfo[playerid][pBikeLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`LKWLic`='%d', ", PlayerInfo[playerid][pLKWLic]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DonatorTime`='%d', ", PlayerInfo[playerid][pDonatorZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`WerberName`='%s', ", PlayerInfo[playerid][pWerberName]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`FightingStyle`='%d', ", PlayerInfo[playerid][pFightingStyle]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Handy`='%d'", PlayerInfo[playerid][pHandy]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring); print(endstring); format(endstring, sizeof(endstring), "UPDATE `users` SET "); format(var, sizeof(var), "`OnDutySkin`='%d', ", PlayerInfo[playerid][pOnDutySkin]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`CarLicPoints`='%d', ", PlayerInfo[playerid][pCarLicPoints]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`BikeLicPoints`='%d', ", PlayerInfo[playerid][pBikeLicPoints]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`InviteSperre`='%d', ", PlayerInfo[playerid][pInviteSperre]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`warntime1`='%d', ", PlayerInfo[playerid][pWarnTime1]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`warntime2`='%d', ", PlayerInfo[playerid][pWarnTime2]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`Ticketsopen`='%d', ", PlayerInfo[playerid][pTicketsopen]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`DonatorTime`='%d', ", PlayerInfo[playerid][pDonatorZeit]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`OldName`='%s', ", PlayerInfo[playerid][pOldName]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`ClientIP`='%s', ", PlayerInfo[playerid][pUserIP]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`OrgMember`='%d', ", PlayerInfo[playerid][pOrgaID]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`OrgLeader`='%d', ", PlayerInfo[playerid][pOrgaLeader]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`OrgManager`='%d', ", PlayerInfo[playerid][pOrgaManager]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), "`OrgName`='%s'", PlayerInfo[playerid][pOrgaName]); strcat(endstring, var, sizeof(endstring)); format(var, sizeof(var), " WHERE `Name`='%s'", playername); strcat(endstring, var, sizeof(endstring)); self_mysql_queryEx(endstring); print(endstring); } return 1; }
OnDialogrespawnse:Code
Alles anzeigenelse if(dialogid == Login) { if(response == 0) { SendClientMessage(playerid, COLOR_ERRORTEXT,"Du hast den Vorgang abgebrochen und wurdest automatisch gekickt."); TogglePlayerControllable(playerid, 0); Kick(playerid); } if(response == 1) { if(strlen(inputtext) == 0 || strlen(inputtext) < -1 || strlen(inputtext) > 15) // Wenn kein Passwort angegebene wurde { ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "Coming Soon: Login", "Bitte gib zur Verifizierung deiner Person das Accountpasswort ein:","Login","Verlassen"); return 1; } else { new NotJoin = 0; new StepID = -1; new sendername[MAX_PLAYER_NAME]; for(new i = 0; i < sizeof(OffPickup); i++) { if(OffPickup[i][OffErstellt] == 1) { if(OffPickup[i][OffZeit] > 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(strcmp(sendername,OffPickup[i][OfflineName], true) == 0) { NotJoin = 1; StepID = i; break; } } } } if(CheckPasswort(playerid, inputtext)) // Wir holen uns das Passwort aus der MySQL Datenbank und überprüfen es mit dem angegebenen passwort. { if(NotJoin == 1) { format(string, sizeof(string), "Du kannst dich erst nach %d Sekunden wieder einloggen.\n\nBitte warte eine Weile und gibt dann dein Accountpasswort ein.",OffPickup[StepID][OffZeit]); ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "Coming Soon: Login", string,"Login","Abbruch"); return 1; } strmid(PlayerInfo[playerid][pKey], inputtext, 0, strlen(inputtext), 255); OnPlayerLogin(playerid); //Der Spieler wird "geladen", speich es werden seine Daten aus der Datenbank geholt und in variablen gespeichert um diese im Skript zu verwenden. return 1; } else { ShowPlayerDialog(playerid, Login, DIALOG_STYLE_PASSWORD, "Coming Soon: Passwort Falsch", "Das eingegebene Passwort ist Falsch, bitte versuche es erneut.","Login","Verlassen"); return 1; } } } return 1; }
//E:
MysQL Update zu R39-6
C:\Users\ASUS\Desktop\GTA - San Andreas Daten\Sachen\Reallife\gamemodes\Reallife.pwn(6190) : error 017: undefined symbol "mysql_store_result"
mysql_store_result(MySQLConnection); -> Zu Was Umändern Mysql R39-6C:\Users\ASUS\Desktop\GTA - San Andreas Daten\Sachen\Reallife\gamemodes\Reallife.pwn(6191) : error 017: undefined symbol "mysql_num_rows"
if(mysql_num_rows(MySQLConnection) != 0) -> Zu Was Umändern Mysql R39-6C:\Users\ASUS\Desktop\GTA - San Andreas Daten\Sachen\Reallife\gamemodes\Reallife.pwn(6196) : error 017: undefined symbol "mysql_fetch_field_row"
mysql_fetch_row_format(TextString); -> Zu Was Umändern Mysql R39-6 -
Ja er speichert wie voher auch als wenn ich im himmel den server verlasse spawne ich auch im himmel ander selben z cordinate
Hast du dir die Werte denn per Print mal vor und nach MapAndreas ausgeben lassen? Wenn ja, was kommt raus?
Danke! Das Problem lag tatsächlich daran, aber warum?
Allerdings bleibt der gleiche Fehler, wenn ich meinen Befehl aufrufe.Die Meldung kam in dem Fall dann vom Debug Modus.
Tritt der Fehler denn nur bei dem Befehl auf, oder auch bei anderen Befehlen?
Hast du mal versucht, den Befehl als "strcmp" Befehl anzulegen, und den ocmd Befehl zu entfernen, klappt es dann? -
-
hast du eventuell eine Lösung?
Dieser Thread ist für kleine Scripting Fragen, nicht für ganze Systeme, die umgebaut werden.
Erstelle bitte einen separaten Thread.Außerdem empfehle ich dir die aktuelle MySQL Version zu nutzen.
-
Die Meldung kam in dem Fall dann vom Debug Modus.
Tritt der Fehler denn nur bei dem Befehl auf, oder auch bei anderen Befehlen?
Hast du mal versucht, den Befehl als "strcmp" Befehl anzulegen, und den ocmd Befehl zu entfernen, klappt es dann?Andere Befehle funktionieren einwandfrei. /inventory funktioniert allerdings auch nicht als "strcmp".
-
/inventory funktioniert allerdings auch nicht als "strcmp".
Dem Log nach wurde erneut ocmd aufgerufen, für den Befehl. Prüfe das bitte nochmal.
ocmdOnPlayerCommandText