Hallo, Leute.
Ich habe ein kleines Problem.
Ich möchte, wenn man seine Skins auswählt, dass ein Text kommt und eine Variable gesetzt wird.
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
switch(classid)
{
case 0: GameTextForPlayer(playerid,"~g~Worker",1000,3) && Worker[playerid] = 1;
case 1: GameTextForPlayer(playerid,"~g~Worker",1000,3) && Worker[playerid] = 1;
case 2: GameTextForPlayer(playerid,"~g~Worker",1000,3) && Worker[playerid] = 1;
case 3: GameTextForPlayer(playerid,"~g~Worker",1000,3) && Worker[playerid] = 1;
case 4: GameTextForPlayer(playerid,"~g~Rich",1000,3) && Worker[playerid] = 1;
case 5: GameTextForPlayer(playerid,"~g~Rich",1000,3) && Worker[playerid] = 1;
case 6: GameTextForPlayer(playerid,"~g~Rich",1000,3) && Worker[playerid] = 1;
case 7: GameTextForPlayer(playerid,"~g~Medic",1000,3) && Worker[playerid] = 1;
case 8: GameTextForPlayer(playerid,"~g~Medic",1000,3) && Worker[playerid] = 1;
case 9: GameTextForPlayer(playerid,"~g~Medic",1000,3) && Worker[playerid] = 1;
case 10: GameTextForPlayer(playerid,"~g~Medic",1000,3) && Worker[playerid] = 1;
case 11: GameTextForPlayer(playerid,"~g~Medic",1000,3) && Worker[playerid] = 1;
}
return 1;
}
Daraus kommen aber immer ein paar Errors/Warnings.
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(148) : error 022: must be lvalue (non-constant)
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(148) : error 036: empty statement
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(149) : error 014: invalid statement; not in switch
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(149) : warning 215: expression has no effect
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(149) : error 001: expected token: ";", but found ":"
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(149) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Mirko G\Desktop\FreeRoam-Project\gamemodes\freeroam.pwn(149) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
Alles anzeigen