Need help with this house system!
#1

Hey, so what is wrong with this code? If i type a command then unknown command :S help please.

http://pastebin.com/JGUNSXQF
Reply
#2

Does this happen with all the commands? or just a few of them? if so please state them.
Reply
#3

second.
Reply
#4

With the ostamaja, it says server unknown command with others it just doesnt do anything.
Reply
#5

Does it say anything in your server log?
Like an error code there?
Is there any warnings / errors in the Pawno Editor?
Reply
#6

No errors, but 2 warnings in pawno

Код:
C:\Users\ilmar\Desktop\NEBULOS FUN\filterscripts\Kodud(tццtlemisel).pwn(423) : warning 203: symbol is never used: "IsNumeric"
C:\Users\ilmar\Desktop\NEBULOS FUN\filterscripts\Kodud(tццtlemisel).pwn(423) : warning 203: symbol is never used: "ReturnUser"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
And no erros in server log.
Reply
#7

Dont see why it wont work, you should try and fix the warnings.(If possible)
Reply
#8

The second parameter in the dcmd() function is length. This has to match the length of the command.

pawn Код:
dcmd(majainfo,9,cmdtext); //this is 8 characters long, yet you've said it's 9
dcmd(sisene,5,cmdtext); //this is 6 characters long, yet you've said it's 5
dcmd(lahku,4,cmdtext); //4; should be 5
dcmd(uuendamaja,5,cmdtext); //5; should be 10
dcmd(lukusta,9,cmdtext); //9; should be 7
dcmd(vlukusta,11,cmdtext); //11; should be 8
dcmd(ostamaja,8,cmdtext); //correct
dcmd(mmaja,9,cmdtext); //9; should be 5
dcmd(katkestam,9,cmdtext); //correct
dcmd(tekitamaja,11,cmdtext); //11; should be 10
dcmd(eemaldamaja,12,cmdtext); //12; should be 11
If you fix those, your commands should work.

_____

I should mention though: ZCMD is much easier and better than DCMD - I recommend using that instead.
Same with dINI; y_ini does everything dINI does, but much easier (at least in my opinion)

You should also learn how to correctly indent your code. The whole script is just a mess - you have no system in your lines. https://sampforum.blast.hk/showthread.php?tid=402743 Read this
Reply
#9

Ohjeah, thanks il try!
Reply
#10

Well the command work but why are my commands and stuff slower now, like if i type /sisene then the command works like 10 sec later or so?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)