11.01.2010, 17:47
How can I do so It takes money from scriptfile and then it sets it -amount on the other scriptfile?
I've set it up like,
Well, but I get this error (On the last line, before the return 1; )
Note, If it gives you more errors then I get, It's because this is not the whole commmand, just the part of it that I can't understand.
I understand the rest Of it and got it correct..
But you might get an idea how I'm thinking.
I've set it up like,
pawn Код:
if(strcmp(cmd, "/payticket", true) == 0){
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
new amount[256];
new astring[64];
amount = dini_Get("scriptfile", playername); // "scriptfile" is set to its real name in the script
format(astring, sizeof(astring), "%d",amount);
dini_IntSet("scriptfile2", playername, dini_Int("scriptfile2", playername)-amount); // "scriptfile2" is set to its real name in the script (This is where i get the error)
return 1;
}
Код:
error 033: array must be indexed (variable "amount")
I understand the rest Of it and got it correct..
But you might get an idea how I'm thinking.


