Hi,
ich habe neben einfachen multilingualen ClientMessages, nun auch eine stock Funktion für multilinguale Dialoge gebastelt.
stock ShowLanguageDialog(playerid, dialogid, style, captionDE[], captionEN[], infoDE[], infoEN[], button1DE[], button1EN[], button2DE[], button2EN[])
{
if(pLanguage[playerid][LANGUAGE_DE]) ShowPlayerDialog(playerid, dialogid, style, captionDE, infoDE, button1DE, button2DE);
if(pLanguage[playerid][LANGUAGE_EN]) ShowPlayerDialog(playerid, dialogid, style, captionEN, infoEN, button1EN, button2EN);
return 1;
}
Soweit, so gut.
Nun gehe ich durchs Script, und editiere alle normalen Dialoge, bis ich auf folgendes stoße.
if(dialogid == DIALOG_CMD_OVERVIEW)
{
if(!response) return 1;
if(response)
{
if(listitem == 0) return ShowLanguageDialog(playerid, DIALOG_TELEPORTS, DIALOG_STYLE_LIST, "Teleports", "Teleports", "Los Santos - LS\nSan Fierro - SF\nLas Venturas - LV", "Los Santos - LS\nSan Fierro - SF\nLas Venturas - LV", "OK", "OK", "Zurück", "Back");
if(listitem == 1) return ShowLanguageDialog(playerid, DIALOG_DM, DIALOG_STYLE_LIST, "Deathmatches", "Deathmatches", "DM1 [Desert Eagle, Shotgun, Sniper]\nDM2 [Desert Eagle, Combat Shotgun, Rifle]\nDM3 [Sawnoff Shotgun, Uzi]\nDM4 [Kettensaege]\nDM5 [Minigun]\nPaintball (PB) [9mm, Country Rifle]", "DM1 [Desert Eagle, Shotgun, Sniper]\nDM2 [Desert Eagle, Combat Shotgun, Rifle]\nDM3 [Sawnoff Shotgun, Uzi]\nDM4 [Chainsaw]\nDM5 [Minigun]\nPaintball (PB) [9mm, Country Rifle]", "OK", "OK", "Zurück", "Back");
if(listitem == 2) return ShowLanguageDialog(playerid, DIALOG_GENERAL, DIALOG_STYLE_LIST, "Spieler Befehle", "Player Commands", "/kill - Selbstmord\n/afk - Abwesend\n/back - Wieder anwesend\n/stats - Spielerstatistik\n/givecash [ID] [Betrag] - Geld geben", "/kill - Suicide\n/afk - Away From Keyboard\n/back - Back from AFK\n/stats - Player Statistics\n/givecash [ID] [Amount] - Give money", "OK", "OK", "Zurück", "Back");
if(listitem == 3) return ShowLanguageDialog(playerid, DIALOG_JOB_CMDS, DIALOG_STYLE_LIST, "Job Befehle", "Job Commands", "Heilen (/heal [ID])\nReparieren (/repair)\nFestnehmen (/arrest [ID])\nBombe legen (/bomb)", "Heal (/heal [ID])\nRepair (/repair)\nArrest (/arrest)\nPlant bomb (/bomb)", "OK", "OK", "Zurück", "Back");
}
return 1;
}
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(860) : error 075: input line too long (after substitutions)
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(861) : error 037: invalid string (possibly non-terminated string)
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(861) : error 017: undefined symbol "Bac"
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(862) : warning 217: loose indentation
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(862) : error 017: undefined symbol "k"
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(862) : warning 215: expression has no effect
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(862) : error 001: expected token: ";", but found ")"
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(862) : error 029: invalid expression, assumed zero
D:\Documents\SAMP 0.3x\gamemodes\brawl.pwn(862) : fatal error 107: too many error messages on one line
Zeile 860 ist das erste "listitem".
Ich hoffe, jemand weiß weiter.
Danke!
EDIT: Hat sich erledigt. Hab probeweise mal die ganzen "return" entfernt, jetzt klappts.