Hey Leute, Ich habe versucht mit dem Wiki und dem Müllabfuhr script mal einen kleinen Job zubasteln zum üben, bin jedoch an den Errors gescheitert..
Command
if(strcmp("/BauernJob", cmdtext, true, 10) == 0)
{
BCP[playerid] = 1;
SpielerInfo[playerid][Job] = 1; // Bauer
SetPlayerCheckpoint(playerid, -21.7644,-34.9566,3.1172,3.0);
return 1;
}
OnPlayerEnterCheckpoint
public OnPlayerEnterCheckpoint(playerid)
{
BCP[playerid] ++;
if(BCP[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 10);
SetPlayerCheckpoint(playerid, 28.2644,-85.4687,1.0968, 3.0);
BCP[playerid] = 2;
}
else if(BCP[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 10);
SetPlayerCheckpoint(playerid, 23.0916,60.7290,3.1172, 3.0);
BCP[playerid] = 3;
}
else if(BCP[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 10);
SetPlayerCheckpoint(playerid, 20.5995,52.0560,3.1172, 3.0);
BCP[playerid] = 4;
}
else if(BCP[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 10);
SetPlayerCheckpoint(playerid, 17.4598,41.1289,3.1172 3.0);
BCP[playerid] = 5;
}
return 1;
}
Errors
C:\SAMPSERVER\pawno\login_register.pwn(161) : error 017: undefined symbol "BCP"
C:\SAMPSERVER\pawno\login_register.pwn(161) : warning 215: expression has no effect
C:\SAMPSERVER\pawno\login_register.pwn(161) : error 001: expected token: ";", but found "]"
C:\SAMPSERVER\pawno\login_register.pwn(161) : error 029: invalid expression, assumed zero
C:\SAMPSERVER\pawno\login_register.pwn(161) : fatal error 107: too many error messages on one line
[b]Zeile 161 -> BCP[playerid] = 1;[/b]
Hoffe jemand kann mir helfen weil Ich weiß echt nichtmehr weiter