Hi habe eben ein Save position command gemacht...
Nur spuckt mir Pawno diese Error aus:
Clan.pwn(415) : error 028: invalid subscript (not an array or too many subscripts): "comment"
Clan.pwn(415) : warning 215: expression has no effect
Clan.pwn(415) : error 001: expected token: ";", but found "]"
Clan.pwn(415) : error 029: invalid expression, assumed zero
Clan.pwn(415) : fatal error 107: too many error messages on one line
dcmd_sp(playerid,params[])
{
new string[128];
new Float:X0, Float:Y0, Float:Z0;
new Float:Rotation0;
new comment;
if(sscanf(params, "z",comment))
{
return SendClientMessage(playerid,weiß,"USAGE: /sp [Comment]");
}
if(IsPlayerAdmin(playerid)) {
GetPlayerPos(playerid, X0, Y0, Z0);
GetPlayerFacingAngle(playerid,Rotation0);
new File:pos22=fopen("Position_Gespeichert.txt", io_append);
format(string,sizeof(string), "%f, %f, %f, %f //%s\r\n", X0, Y0, Z0, Rotation0, comment[0] ? comment : ""); //<--------- 415
fwrite(pos22, string11);
fclose(pos22);
SendClientMessage(playerid,grün,"Position erfolgreich abgespeichert");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
}
else {
SendClientMessage(playerid,rot,"Du musst Admin sein um dieses Kommando ausführen zu können.");
}
return 1;
}
Was ist den da falsch?