Houselocker problem
#1

SLOVED

Thanks zxc1
Reply
#2

Why you use a '!' ?
pawn Код:
if(!strcmp(tmp, "take"))
It should be:
pawn Код:
if(strcmp(tmp, "take"))
Reply
#3

I putted at house file a guns for a test and even that didnt show up.
still show 0 guns
Im testing without !
pawn Код:
new cursguns = dini_Int(filename,"sguns");
    new cursdrugs = dini_Int(filename,"sdrugs");        
SendClientMSG(playerid, COLOR_LIGHTGREY, "LOCKER: There is currently %d Guns and %d Drugs in the locker.", cursguns, cursdrugs);
        return SCP(playerid, "[ take / put ] [ sguns / sdrugs ] [ amount ]");
Reply
#4

Did you change the guns value in the file, while the server was running?
If yes, turn it off, change the value, turn it on again, and tell me if it's still zero.
Reply
#5

Quote:
Originally Posted by zxc1
Посмотреть сообщение
Why you use a '!' ?
pawn Код:
if(!strcmp(tmp, "take"))
It should be:
pawn Код:
if(strcmp(tmp, "take")
Still not works.
When i doing /houselocker take sguns 1 that telling me you have put 0 sguns not takes. and for sure there inside house 100 sguns for test that just wont show the house sguns and take / put them
Reply
#6

I think I know what is the problem.
Are you sure the directory is "Casa%d.txt"?
And not something like "Houses/Casa%d.txt"?
This mistake happens a lot.
Reply
#7

Quote:
Originally Posted by zxc1
Посмотреть сообщение
I think I know what is the problem.
Are you sure the directory is "Casa%d.txt"?
And not something like "Houses/Casa%d.txt"?
This mistake happens a lot.
Yes im sure, its fine and all reading the guns from house and not taking the guns or put them from player
Reply
#8

I found the problem.
You did not define the 'amount'.
pawn Код:
amount = strval(tmp3);
Reply
#9

Quote:
Originally Posted by zxc1
Посмотреть сообщение
Why you use a '!' ?
pawn Код:
if(!strcmp(tmp, "take"))
It should be:
pawn Код:
if(strcmp(tmp, "take"))
No.. it should be !strcmp.

It checks if the input is the same as what the scripter compared it with, in this case with 'take'.

@ Camorra: I hate people who steal other people's codes/scripts. ( You know what I mean )
Reply
#10

Quote:
Originally Posted by Denying
Посмотреть сообщение
No.. it should be !strcmp.

It checks if the input is the same as what the scripter compared it with, in this case with 'take'.

@ Camorra: I hate people who steal other people's codes/scripts. ( You know what I mean )
They gavve it to me, keep listen to bullshits.


Quote:
Originally Posted by zxc1
Посмотреть сообщение
I found the problem.
You did not define the 'amount'.
pawn Код:
amount = strval(tmp3);
^^ Not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)