Cmd Problem
#1

whats wrong here


C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : error 029: invalid expression, assumed zero
C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : error 017: undefined symbol "cmd_test"
C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : error 029: invalid expression, assumed zero
C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : fatal error 107: too many error messages on one line!


i added it on the public TextCommand

CMD:test(playerid, params[])
{
........ etc
}


& i added this on the top of TextCommand


cmd(test,4,cmdtext);


what missing ? & thank you all


Reply
#2

Copy all your test command here
and delete this line
pawn Код:
cmd(test,4,cmdtext);
Reply
#3

i added my line of Test command to
public OnPlayerCommandText(playerid,cmdtext[])

but its same problem

& i removed what you told me to do

C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : error 029: invalid expression, assumed zero
C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : error 017: undefined symbol "cmd_test"
C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : error 029: invalid expression, assumed zero
C:\Users\mininou\Desktop\Dogg\gamemodes\m2s.pwn(13 960) : fatal error 107: too many error messages on one line!
Reply
#4

This syntax is from ZCMD and the commands of ZCMD are supposed to be place OUTSIDE of OnPlayerCommandText (and thank you for dropping the bold text)
Reply
#5

could you give a more information how & thank you Mamorunl . where i should add them so ?
Reply
#6

Anywhere outside a callback is fine. So the "On<>" publics are callbacks. OnPlayerText, OnPlayerCommandText, OnPlayerExitVehicle, etc. Place it outside any of those and it'll be fine.
Reply
#7

Fixed Thank You Mamorunl +1 rep
Reply
#8

my other commands are all now ' Unknown Command ' how i fix that now & thanks guys
Reply
#9

ZCMD and the old type strcmp commands do not go together. You should use one or the other and I would recommend ZCMD because it is faster and easier to maintain.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)