SERVER: Unknown Command
#1

What am i doing wrong in THIS that makes it give me the "SERVER:Unknown Command" error ingame when i type "/opengate" ?
Reply
#2

try

if(strcmp(cmd, "/opengate", true) == 0)
Reply
#3

Quote:
Originally Posted by jasonbridges
try

if(strcmp(cmd, "/opengate", true) == 0)
Thats not the problem because the opengate command works with other gamemodes, i tried putting a registration system in and the register/login commands wouldnt work either. and for some reason it only happens to scripts i make, never any scripts i put the commands into to test them like lvdm.pwn
Reply
#4

Quote:
Originally Posted by Ritchie999
Quote:
Originally Posted by jasonbridges
try

if(strcmp(cmd, "/opengate", true) == 0)
Thats not the problem because the opengate command works with other gamemodes, i tried putting a registration system in and the register/login commands wouldnt work either. and for some reason it only happens to scripts i make, never any scripts i put the commands into to test them like lvdm.pwn
I think you heve problem with buckles
Can you show us all code of opengate ?
Reply
#5

Quote:
Originally Posted by E-Max
Quote:
Originally Posted by Ritchie999
Quote:
Originally Posted by jasonbridges
try

if(strcmp(cmd, "/opengate", true) == 0)
Thats not the problem because the opengate command works with other gamemodes, i tried putting a registration system in and the register/login commands wouldnt work either. and for some reason it only happens to scripts i make, never any scripts i put the commands into to test them like lvdm.pwn
I think you heve problem with buckles
Can you show us all code of opengate ?
Thats the whole script what i uploaded onto pastebin. i started a new script.. opengate works on other scripts though, i just used that command as an example of it not working.. any command i make wont work. i continue to get the "SERVER:Unknown Command"
Reply
#6

i just tried running that script as the gamemode and it worked fine.

[quote=Annihalation ]
if your using it on a filterscript, and not the actual GameMode file, the server will think its a crazy command, but the filterscript wont ...

If it is in a filterscript, go to the GameMode file and put in, under OnPlayerCommandText:

Код:
if (strcmp("/epr", cmdtext, true)==0) return 1;
that should make it to where when you type /epr you dont get that "Unknown command" message thingy
Reply
#7

--Edit--

i got it working, i was either a registration system or else the <custom> #include

but now when i try to add registration system i get errors when i #define COLOR_RED so i changed to COLOR_WHITE and i still get the same error

http://pastebin.com/m1ec1abc1

errors are
Код:
C:\Users\richard\Desktop\samp 0.3 R3\gamemodes\NewProject.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\richard\Desktop\samp 0.3 R3\gamemodes\NewProject.pwn(183) : warning 215: expression has no effect
C:\Users\richard\Desktop\samp 0.3 R3\gamemodes\NewProject.pwn(183) : error 001: expected token: ";", but found ")"
C:\Users\richard\Desktop\samp 0.3 R3\gamemodes\NewProject.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\richard\Desktop\samp 0.3 R3\gamemodes\NewProject.pwn(183) : fatal error 107: too many error messages on one line
pawn Код:
if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE:/register [password]");
  if(dini_Exists(file)) return SendClientMessage(playerid, COLOR_WHITE, "You are already registered!");
line 183 is in the dcmd_register part at the end of the script
Reply
#8

http://pastebin.com/m48aba8ff here is wat you posted but it works and has been improved command wise
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)