SA-MP Forums Archive
Need help with this house system! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with this house system! (/showthread.php?tid=408246)



Need help with this house system! - Hade. - 17.01.2013

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

http://pastebin.com/JGUNSXQF


Re: Need help with this house system! - Jason_Dealley - 17.01.2013

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


Re: Need help with this house system! - Hade. - 17.01.2013

second.


Re: Need help with this house system! - Hade. - 17.01.2013

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


Re: Need help with this house system! - Jason_Dealley - 17.01.2013

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


Re: Need help with this house system! - Hade. - 17.01.2013

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.


Re: Need help with this house system! - Jason_Dealley - 17.01.2013

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


Re: Need help with this house system! - LarzI - 17.01.2013

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


Re: Need help with this house system! - Hade. - 17.01.2013

Ohjeah, thanks il try!


Re: Need help with this house system! - Hade. - 17.01.2013

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?