Hey,
Ich habe heute begonnen zu skripten und habe direkt ein Problem, das ich selbst nich lösen kann. Ich habe eine Box erstellt, in der man direkt beim connecten seine Fraktion, für die man kämpfen möchte, auswählen soll. Demanch haben die Fraktionen verschiedene Skins also habe ich folgenden Script geschrieben:
PHP
#include <a_samp>
#define fraktionen 1
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Tester");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
print("\n----------------------------------");
print("Tester");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Tester V1.0");
AddPlayerClass(280,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
AddPlayerClass(280,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(281,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(283,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(284,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(285,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(286,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(287,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(288,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(289,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
}
if(listitem == 1)
{
AddPlayerClass(277,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(278,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(279,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
}
if(listitem == 2)
{
AddPlayerClass(105,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(106,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(107,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
}
if(listitem == 3)
{
AddPlayerClass(102,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(103,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(104,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
}
if(listitem == 4)
{
AddPlayerClass(114,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(115,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(116,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
}
if(listitem == 5)
{
AddPlayerClass(108,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(109,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
AddPlayerClass(110,-1971.3087,119.2462,27.6875,359.5656,24,100,29,9999,41,9999);
}
}
}
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, -1971.3087, 119.2462, 27.6875);
SetPlayerFacingAngle(playerid, 359.5656);
SetPlayerCameraPos(playerid, -1971.2891, 121.7859, 27.6875);
SetPlayerCameraLookAt(playerid, -1971.3087, 109.2462, 27.6875);
return 1;
}
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, fraktionen, DIALOG_STYLE_LIST, "Fraktion wählen", "Polizei\nFeuerwehr\nMilitär\nGrove Street\nBallas\nLos Aztecas\nLos Santos Vagos", "Auswählen", "Abbrechen");
return 1;
}
Alles anzeigen
Dennoch kommen folgende Errors:
PHP
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(31) : error 017: undefined symbol "dialogid"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(33) : error 017: undefined symbol "response"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(35) : error 017: undefined symbol "listitem"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(47) : error 017: undefined symbol "listitem"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(53) : error 017: undefined symbol "listitem"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(59) : error 017: undefined symbol "listitem"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(65) : error 017: undefined symbol "listitem"
C:\Dokumente und Einstellungen\GiS\Eigene Dateien\Server\gamemodes\Tester.pwn(71) : error 017: undefined symbol "listitem"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Errors.
Alles anzeigen
Ich hoffe auf einige nützliche Antworten in den nächsten paar Minuten, Danke.