#1

usual people put
Код:
new string[128];
can i do this instead?
Код:
CMD:ticket(playerid, params[],string[128])
Reply
#2

Of course you can... seems a bit pointless, but it still works.
Reply
#3

I don't think that works, just put
pawn Код:
new string[128];
below your commandline
Reply
#4

Fusion i meant that instead of doing what you recommend if i can put in into the command thing 4 zcmd ... -_-
Reply
#5

Why would you want to do that anyway? it's one additional line, not that big of a deal
Reply
#6

I am exploring how to use zcmd so i was wondering
Reply
#7

What Catalyst said.
Reply
#8

Quote:
Originally Posted by Skillet`
Посмотреть сообщение
No,you can't.
Why can't he? Doing so does the exact same thing. Please explain, seeing as though you're so sure.
Reply
#9

You can't because Zeex made the structure using a define,you'll need to add such an option by yourself if you want to use the command proccecor like that.
zcmd.inc
pawn Код:
#define COMMAND:%1(%2)          \
            forward cmd_%1(%2); \
            public cmd_%1(%2)      
           
#define CMD:%1(%2) \
            COMMAND:%1(%2)

#define command(%1,%2,%3) \
            COMMAND:%1(%2, %3)      
     
#define cmd(%1,%2,%3) \
            COMMAND:%1(%2, %3)
you'll need to make something like : (untested)
pawn Код:
#define COMMAND:%1(%2,%3[%4])          \
            forward cmd_%1(%2); \
            public cmd_%1(%2)       \
            new %3[%4];
           
#define CMD:%1(%2,%3[%4]) \
            COMMAND:%1(%2,%3[%4])

#define command(%1,%2,%3) \
            COMMAND:%1(%2, %3)      
     
#define cmd(%1,%2,%3) \
            COMMAND:%1(%2, %3)
Reply
#10

Quote:
Originally Posted by Skillet`
Посмотреть сообщение
You can't because Zeex made the structure using a define,you'll need to add such an option by yourself if you want to use the command proccecor like that.
But what I'm asking is; It DOES work, so why can't he use it?
Nothing at all would need to be changed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)