Server crashes due to Kick or Ban? -
alpha500delta - 30.11.2010
Well, I am making a script (wich I may release here)
But for some reason I have a weird problem.
Everytime I use /kick, or /ban or any other form that uses Kick(playerid); or Ban(playerid); My server Instantly crashes, does someone know how this can happen?
Some info: Im using ZCMD, im using sscanf2. I have 7 warnings:
Код:
C:\Users\Laptop\Desktop\Server\gamemodes\***(905) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Laptop\Desktop\Server\gamemodes\***(914) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Laptop\Desktop\Server\gamemodes\***(940) : warning 202: number of arguments does not match definition
C:\Users\Laptop\Desktop\Server\gamemodes\***(1337) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Laptop\Desktop\Server\gamemodes\***(1940) : warning 202: number of arguments does not match definition
C:\Users\Laptop\Desktop\Server\gamemodes\***(1940) : warning 202: number of arguments does not match definition
C:\Users\Laptop\Desktop\Server\gamemodes\UnitedNations.pwn(3620) : warning 235: public function lacks forward declaration (symbol "IsVehicleInUseByPlayer")
But I dont think that has anything to do with it.
Btw 2nd question: My Samp-Server exits when I leave GTA, anyone knows how?
Thanks in Advance,
Alpha500delta
Re: Server crashes due to Kick or Ban? -
Hiitch - 30.11.2010
Ok, first two errors, you have a variable called 'name' that you declared two times, change one of them to something else, or make 1 global variable called 'name', that can be used for whatever you had in mind.
Third error, the function you were trying to use is missing a parameter, and will not run correctly unless the missing parameter is added. (Code needed)
Fourth, same as the first one, you have a variable that is declared two times, with the same name.
Fifth and Sixth are the same as the third error, you need to put in the missing parameter. (Code needed)
Last error, you forgot to do:
pawn Код:
forward IsVehicleInUseByPlayer(playerid, vehicleid);
Or something like that.
Look over your code for the obvious, and read what I typed. Good luck.
--
As for the second one, I'm not sure what is causing that.
Re: Server crashes due to Kick or Ban? -
alpha500delta - 30.11.2010
Thanks but, it's not errors but warnings.
Also I did do "forward IsVehicleInUseByPlayer(playerid, vehicleid);"
But does that explain why Kick and Ban crashes? (some wrong new's)
Re: Server crashes due to Kick or Ban? -
Ash. - 30.11.2010
Quote:
Originally Posted by alpha500delta
But does that explain why Kick and Ban crashes? (some wrong new's)
|
Most likely - I had the same problem when i used a command once - it was so annoying, and i kicked myself when i figured out why xD
Re: Server crashes due to Kick or Ban? -
Hiitch - 30.11.2010
Quote:
Originally Posted by alpha500delta
But does that explain why Kick and Ban crashes? (some wrong new's)
|
Depends on if the kick / ban commands are linked to that function, or if that function is / was poorly created.
Re: Server crashes due to Kick or Ban? -
ThePwherer - 30.11.2010
Try adding
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));.
Re: Server crashes due to Kick or Ban? -
alpha500delta - 01.12.2010
Thats not it, it just crashes if I use Kick(playerid);
In any command, any function
Thanks for help, ill try fixing those warnings first
Edit: Warnings fixed, lets test
Edit2: AYAYAYAYAYAYAYAYAyAYAYYAAYAYAYAYAY fixed ty ALL!