Bekomme 4 Errors wieso?
C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127965) : error 028: invalid subscript (not an array or too many subscripts): "playerid"
C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127965) : warning 215: expression has no effect
C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127965) : error 001: expected token: ";", but found "]"
C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127965) : error 029: invalid expression, assumed zero
C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127965) : fatal error 107: too many error messages on one line
ocmd:abbauen(playerid,params[])
{
if(dienst[playerid] == 0)
{
if(PlayerInfo[playerid][pSpitzhacke] == 1 && PlayerInfo[playerid[pRucksack] == 1) return SendClientMessage(playerid,COLOR_PURPLE,"Du hast deine Ausrüstung nicht dabei!");//ERROR ZEILE
{
if(PlayerInfo[playerid][pKristalle] < 100) return SendClientMessage(playerid,COLOR_PURPLE,"Dein Rucksack ist voll .. gebe diese erstmal ab!");
{
for(new i=0;i<MAX_KRISTALLE;i++)
{
if(IsPlayerInRangeOfPoint(playerid,2.5,SKristallInfo[i][kposX],SKristallInfo[i][kposY],SKristallInfo[i][kposZ]) && SKristallInfo[i][KristallCreated] == true)
{
new randzeit = random(6000) + 5000;
SendClientMessage(playerid,COLOR_PURPLE,"* Du beginnst den Kristall abzubauen!");
TogglePlayerControllable(playerid,0);//FREEZE
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
//SetTimer("KristallErnte",randzeit,0);
KristallTimer[playerid] = SetTimerEx("KristallErnte", randzeit, true, "i", playerid);
return 1;
}
}
}
}
}
return 1;
}
4 Errors klammerfehler?
- PabloEscobarYo
- Geschlossen
- Erledigt
-
-
Mit dem return hast du bereits die If Abfrage abgeschlossen und darfs dann nicht noch Klammern machen,
Code
Alles anzeigenocmd:abbauen(playerid,params[]) { if(dienst[playerid] == 0) { if(PlayerInfo[playerid][pSpitzhacke] == 1 && PlayerInfo[playerid[pRucksack] == 1) return SendClientMessage(playerid,COLOR_PURPLE,"Du hast deine Ausrüstung nicht dabei!");//ERROR ZEILE if(PlayerInfo[playerid][pKristalle] < 100) return SendClientMessage(playerid,COLOR_PURPLE,"Dein Rucksack ist voll .. gebe diese erstmal ab!"); for(new i=0;i<MAX_KRISTALLE;i++) { if(IsPlayerInRangeOfPoint(playerid,2.5,SKristallInfo[i][kposX],SKristallInfo[i][kposY],SKristallInfo[i][kposZ]) && SKristallInfo[i][KristallCreated] == true) { new randzeit = random(6000) + 5000; SendClientMessage(playerid,COLOR_PURPLE,"* Du beginnst den Kristall abzubauen!"); TogglePlayerControllable(playerid,0);//FREEZE SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1); //SetTimer("KristallErnte",randzeit,0); KristallTimer[playerid] = SetTimerEx("KristallErnte", randzeit, true, "i", playerid); return 1; } } } return 1; }
-
Kommen immer noch :
C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127946) : error 028: invalid subscript (not an array or too many subscripts): "playerid"C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127946) : warning 215: expression has no effectC:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127946) : error 001: expected token: ";", but found "]"C:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127946) : error 029: invalid expression, assumed zeroC:\Users\DerMeister\Desktop\Life of San Andreas\gamemodes\script3.3.2.pwn(127946) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase4 Errors.
ocmd:abbauen(playerid,params[]){ if(dienst[playerid] == 0) { if(PlayerInfo[playerid][pSpitzhacke] == 1 && PlayerInfo[playerid[pRucksack] == 1) return SendClientMessage(playerid,COLOR_PURPLE,"Du hast deine Ausrüstung nicht dabei!");//ERROR ZEILE if(PlayerInfo[playerid][pKristalle] < 100) return SendClientMessage(playerid,COLOR_PURPLE,"Dein Rucksack ist voll .. gebe diese erstmal ab!"); for(new i=0;i<MAX_KRISTALLE;i++) { if(IsPlayerInRangeOfPoint(playerid,2.5,SKristallInfo[i][kposX],SKristallInfo[i][kposY],SKristallInfo[i][kposZ]) && SKristallInfo[i][KristallCreated] == true) { new randzeit = random(6000) + 5000; SendClientMessage(playerid,COLOR_PURPLE,"* Du beginnst den Kristall abzubauen!"); TogglePlayerControllable(playerid,0);//FREEZE SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1); //SetTimer("KristallErnte",randzeit,0); KristallTimer[playerid] = SetTimerEx("KristallErnte", randzeit, true, "i", playerid); return 1; } } } return 1;}
//EDIT: Sehe den Fehler hab einfach eine [ vergessen nach playerid
-
breadfish.de
Hat das Thema geschlossen.