if(strcmp(cmd, "/entwenden", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /entwenden [betrag]");
return 1;
}
new spende = strval(tmp);
GivePlayerMoney(playerid, +spende);
new pname3[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname3, sizeof(pname3));
new File: pFile = fopen("staat.txt", io_write);
if (pFile)
{
new var[32];
format(var, 32, "Spenden-=%d",spende);
fwrite(pFile, var);
fclose(pFile);
}
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
new string[256];
format(string, sizeof(string), "%s hat von der Staatskasse %d $ entommen.", pname, spende);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
Folgende Errors bekomme ich herraus:
E:\SAMP 0.3\gamemodes\selfmade.pwn(7789) : error 029: invalid expression, assumed zero
E:\SAMP 0.3\gamemodes\selfmade.pwn(7789) : warning 215: expression has no effect
E:\SAMP 0.3\gamemodes\selfmade.pwn(7789) : error 001: expected token: ";", but found ")"
E:\SAMP 0.3\gamemodes\selfmade.pwn(7789) : error 029: invalid expression, assumed zero
E:\SAMP 0.3\gamemodes\selfmade.pwn(7789) : fatal error 107: too many error messages on one line