SA-MP Forums Archive
Help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please (/showthread.php?tid=210027)



Help please - darkknight123 - 12.01.2011

im trying to make a command

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
if (strcmp("/asslick", cmdtext, true))
{
new tmp[30];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Usage: /asslick [id]");
if(IsPlayerConnected(otherplayer))
{
SendClientMessage(playerid, #F781F3," You're now Asslicking %d ! Have a good time doing it! also heres $1 for you " );
SendClientMessageToAll(#F781F3, "%s is now asslicking %d ! He should be proud of himself!" );
SendClientMessage(otherplayer, 0xE21D2CFF, "%d is now asslicking you! he be good friend! " );
GivePlayerMoney(playerid, 1);
}
else
{
SendClientMessage(#F781F3, "Haha!, The Player you are trying to asslick isn't online! noob.");
}
return 1;
}
return 0;
}

then get these errors

Quote:

C:\Documents and Settings\gamer\Desktop\MW-DM\filterscripts\asslick.pwn(16) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\gamer\Desktop\MW-DM\filterscripts\asslick.pwn(17) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\gamer\Desktop\MW-DM\filterscripts\asslick.pwn(23) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

what do i do? please help


Re: Help please - Kyosaur - 12.01.2011


Also i'd look into sscanf and zcmd, its a LOT simpler and does a hell of a lot more in terms of functionality.


Re: Help please - darkknight123 - 12.01.2011

Thanks


Re: Help please - Kyosaur - 12.01.2011

Quote:
Originally Posted by darkknight123
Посмотреть сообщение
Thanks
No problem, if you need more help with this shoot me a pm .


Though i really do suggest looking into sscanf and zcmd. Better speed, easier to use, and they do more .