Identifying a player problem.
#1

When I use a command such as let's say /pm ( private message ) [playerid] [text] and try using the full name or just a random letter/word it sends the private message to me, even if my name is "Mark" and I use "g".

I have tried to ****** it, but I did not even know what to ******.

What may be the problem?

Thank you in advance.
Reply
#2

Post code
Reply
#3

All of it? Alright.
Reply
#4

Man, your code is a mess. How could anyone possibly debug this ...
Reply
#5

I just started scripting a week ago. :/

Any advices on how to make it a bit more clear or anything like that?
Reply
#6

If you post just the /pm command here, between pawn tags, we can see if it's a problem in the command, or maybe your sscanf being outdated.

EDIT: before posting the code, you might want to indent it properly using the tutorial in [MG]Dimi's link below my post.
This way it will be alot easier to find eventual problems
Reply
#7

https://sampforum.blast.hk/showthread.php?tid=251335
Reply
#8

Alright, thank you for all the help.
You deserve a reputation point.
Reply
#9

By the way, it is not the actual command.
It is the same in every command that requiers a player's name/ID.

It uses the ID perfectly, but when I try using a name, part of a name it just chooses a random player. I will update my gamemode and make it as readable as possible and make an other thread or just post a new link to the new one.

Thank you all.
Reply
#10

I've made everything in the script alot more clear. ( which was a bit annoying 2000 lines :/ )
And now all I have to say is thank you and..
I still have the same problem.

Here's just the /pm part ( even though it happens with every command which requiers a player's ID )

http://pastebin.com/kxrNFPNx

The problem is when I put an ID ( e.g 1 ) it will work perfectly, but when I try using a player name ( e.g. Mario_Casso ) it will do as the command should do but for a random player. And not to "Mario_Casso"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)