24.03.2011, 15:56
Hey, I got a prob. Errors like always.
Errors: Error 006: must be assigned to an array
Lines:
Errors: Error 006: must be assigned to an array
Lines:
pawn Код:
if(strcmp(cmd, "/atmtransfer", true) == 0 || strcmp(cmd, "/atmwiretransfer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, " Du musst mindestens Level 3 sein !");
return 1;
}
if(!AtATM(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Du bist nicht an einem ATM !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /atmtransfer [spielerid/name] [betrag]");
return 1;
}
tmp = strtok(cmdtext, idx);
giveplayerid = ReturnUser(tmp); // This is the Line
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /atmtransfer [spielerid/name] [betrag]");
return 1;
}
moneys = strval(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = PlayerInfo[playerid][pAccount] ;
if (moneys > 0 && playermoney >= moneys)
{
PlayerInfo[playerid][pAccount] -= moneys;
PlayerInfo[giveplayerid][pAccount] += moneys;
format(string, sizeof(string), "Du hast %d$ auf %s's Konto ьberwiesen.", moneys, giveplayer,giveplayerid);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "Du hast %d$ auf dein Konto von %s ьberwiesen bekommen.", moneys, sendername);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
format(string, sizeof(string), "%s hat %d$ an %s ьberwiesen.", sendername, moneys, giveplayer);
if(moneys >= 500000)
{
ABroadCast(COLOR_YELLOW,string,1);
}
PayLog(string);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Ungьltiger Betrag.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist nicht beim ATM");
}
}
else
{
format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}