How to use params in strcmp
#1

Hey guys,

I need to know how I can use params in strcmp. I know how to use it in zcmd, but.. Not with strcmp.

With ZCMD you can do it so..

pawn Код:
CMD:pm(playerid, params[])
    {
Very easy to know.. But with strcmp is it different and I dont know how to do that..

pawn Код:
if (strcmp("/pm", cmdtext, true, 10) == 0)
    {
See? the params didnt in there, that gives me errors:

pawn Код:
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(62) : warning 201: redefinition of constant/macro (symbol "pInfo")
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(1208) : error 029: invalid expression, assumed zero
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(1208) : warning 215: expression has no effect
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(1208) : warning 215: expression has no effect
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(1208) : error 029: invalid expression, assumed zero
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(1208) : error 029: invalid expression, assumed zero
F:\GTA San Andreas\Freeroam Server\pawno\Untitled2.pwn(1208) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
This is line 1208:

pawn Код:
if(sscanf(params, "us[128]", id, params)) return SendClientMessage(playerid, COLOR_RED, "Syntax: /pm (id) (text)");
I hope anyone can tell me more about this..

Thank you guys
Reply


Messages In This Thread
How to use params in strcmp - by mickos - 29.12.2012, 21:39
Re: How to use params in strcmp - by mickos - 29.12.2012, 21:44
Re: How to use params in strcmp - by Mr.Anonymous - 29.12.2012, 21:58
Re: How to use params in strcmp - by mickos - 29.12.2012, 22:10
Re: How to use params in strcmp - by Mr.Anonymous - 29.12.2012, 22:20
Re : Re: How to use params in strcmp - by [HRD]Mar1 - 29.12.2012, 22:23
Re: How to use params in strcmp - by mickos - 30.12.2012, 10:51

Forum Jump:


Users browsing this thread: 2 Guest(s)