27.10.2012, 05:59
I'm trying to store a player's information when they send someone a duel request, but keep getting the error "Argument Type Mismatch (Argument 1)". My code:
and this one in an include (note that i DID include this file in the header):
Even if I remove everything from that function 'duelStore' and recompile, I still get the error. Also, this code is under the 'OnPlayerCommandText' function. Since it's argument 1, the problem is in 'playerid' but I don't see how one integer can be a mismatch to another?
Код:
new id[128],amount[128], weapon1[123], weapon2[123], weapon3[123]; id = strtok(cmdtext, idx); amount = strtok(cmdtext, idx); weapon1 = strtok(cmdtext, idx); weapon2 = strtok(cmdtext, idx); weapon3 = strtok(cmdtext, idx); duelStore(playerid, strval(id), strval(amount), GetWeaponID(weapon1), GetWeaponID(weapon2), GetWeaponID(weapon3));
Код:
duelStore(whoSentID, sentToID, Amount, Weapon1, Weapon2, Weapon3){ duelInfo[whoSentID][sentID] = whoSentID; duelInfo[whoSentID][ToID] = sentToID; duelInfo[whoSentID][price] = Amount; duelInfo[whoSentID][w1] = Weapon1; duelInfo[whoSentID][w2] = Weapon2; duelInfo[whoSentID][w3] = Weapon3; }