ConnectNPC() won't connect my NPC...
#1

Hello.

I'm struggling to get this issue fixed. My NPC works like a charm on my local server. But on my host (Debian 7 Wheezy - 64 bits), he won't even TRY to connect with ConnectNPC() (not even a connection incoming from 127.0.0.1). But he will connect correctly if I launch him via SSH (root):
Code:
./samp-npc -h 127.0.0.1 -p 8888 -n Chuck_Norris -m ChuckNorris &
Why won't it work? Also note that I've set the CHMOD of samp-npc to 777, in case of, but it doesn't help at all.
I do have installed the packages to run 32 bit applications, in case you're wondering.

I've tried browsing the entire logs of the VPS, no-thing to be found.

I'll admit that I'm kinda newbie at managing a Linux host, but well until now I've always managed to get things working by Googlin'. This time I'm completely stuck and have no idea what to try.
Reply
#2

Do you have "maxnpc" set to something above 0? Show your code aswell.
Reply
#3

Quote:
Originally Posted by Abagail
View Post
Do you have "maxnpc" set to something above 0?
I was so expecting that question.
Not only maxnpc is set correctly, but I also said that I DO can connect him with a SSH command. I wouldn't be able to do it if he hadn't room to connect on the SA-MP server.

I have no code to show, this is not a PAWN script issue. This is a Linux related issue, and I'm 90% sure about it.
I think that it could be related to some authorizations stuff, but I actually have absolutely no clue how to check if it could be samp03svr that isn't allowed to do launch samp-npc, while my little bash scripts do can launch samp03svr.

I'd really like not to have to launch the NPC from a bash script.
Reply
#4

Show your code.
Reply
#5

You're stubborn.

Code:
ConnectChuck()
{
	ConnectNPC("Chuck_Norris","ChuckNorris");
}

public OnGameModeInit()
{
    // Stuff here that works pretty well and is executed
    ConnectChuck();
    // Stuff here that also works pretty well and is also executed
}
Happy?
I'm telling you it used to work on another linux server. So there's no reason that all by magic the code would make it fail on this one.

So please stop treating me like the average and random newb scripter, it's insulting. When my server code is at fault, I know it.
Reply
#6

What about the permissions on the samp server subdirectories (npcmodes especially).
Possibly the server doesnt have the permissions to access the npc scripts, and so wont connect npcs, but via ssh you got them and can connect the npc.
Reply
#7

It's not an issue with this I'm afraid. Even by setting the CHMOD to the directory and the NPC script to 777, there's still nothing. I did a "stat" on the NPC script, and apparently the SAMP server doesn't even try to open it. Same goes for samp-npc: none of the 3 dates in "stat" are updated, unless I launch it manually, in which case the "access" date is updated.

It's like the SAMP server plainly fails at locating the "samp-npc" to launch it, which is in the same directory than it.

EDIT:
I found it!
Apparently, it was due to my linux server directory structure. I had my servers in subdirectories named like this:
"SAMP servers/DM N Race - Carmaggeddon"
And somehow the samp server does NOT like it.
I used this instead:
"sampservers/carmaggeddon"
And the NPC works like a charm!

Conclusion:
Kalcoooooooor. You got a BUG to fix.
Reply
#8

It's not actually a bug for Kalcor to fix, it's just how Linux works. Let's say, if you create a folder on Windows named 'SA MP' (excluding apostrophe) with the space, it will work. But if you create a folder on Linux named 'SA MP' (again excluding apostrophe) with the space, it will work albeit in a different manner. Two folders gets created, one being named SA and the other named MP.

You can replace spaces with underscores in Linux, if you want to.
Reply
#9

This is still a bug, as Kalcor most likely forgot to use quotes in the command syntax used to launch samp-npc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)