Command isn't working properly -
cloudysky - 03.06.2012
Fixed
Re: Command isn't working properly -
cloudysky - 03.06.2012
Sorry for the double post but I can't see what's wrong with this?
Re: Command isn't working properly -
Infinity90 - 03.06.2012
Quote:
Originally Posted by cloudysky
I'm not sure if it's an sscanf update
|
I suggest you check and download the latest version of sscanf.
Re: Command isn't working properly -
cloudysky - 03.06.2012
Thanks for the reply, I've updated sscanf but I don't think that's the problem. I can't see the problem :S
Re: Command isn't working properly -
leonardo1434 - 03.06.2012
Edit, ops i didn't saw... it's defined... but let me fix the command in the next post..
Re: Command isn't working properly -
cloudysky - 03.06.2012
Yeah, can you give me an example. I would appreciate that.
Re: Command isn't working properly -
leonardo1434 - 03.06.2012
Well, i recommend you change this to a KEY instead of a command to be write. Don't forget to define zombie, i hope you already have it.
pawn Code:
command(bite, playerid, params[])
{
new string[128];
new player[MAX_PLAYER_NAME];
new humanplayer[MAX_PLAYER_NAME];
new human;
// humans don't bite...
if(sscanf(params, "u", zombie)) return SendClientMessage(playerid, COLOUR_WHITE, "HINT: /bite [Playerid]");
if(!IsPlayerConnected(zombie)) return SendClientMessage(playerid, COLOUR_WHITE, "HINT: You can't bite someone who isn't online!");
new Float: bx, Float: by, Float: bz,health;
GetPlayerPos(human, bx, by, bz );
if(IsPlayerInRangeOfPoint(playerid, 10, bx, by, bz))
{
GetPlayerName(playerid, player, sizeof(player);
GetPlayerName(human, humanplayer, sizeof(humanplayer);
GetPlayerHealth(human, health);
SetPlayerHealth(human,health -10);
format(string, sizeof(string),"[WARNING] You have been biten by %s, you better get to the CDC or try your luck in the hospital!", player,humanplayer);
SendClientMessage(human, COLOUR_GREEN, string );
format(string2, sizeof(string2),"[NOTE] You have biten %s", humanplayer);
SendClientMessage(playerid, COLOUR_RED, string2 );
SaveUser(human);
}
return 1;
}
Re: Command isn't working properly -
cloudysky - 03.06.2012
Thanks I'll try it out and get back to you
Re: Command isn't working properly -
cloudysky - 03.06.2012
It isn't working but I've just noticed I'm getting this message:
sscanf error: System not initialised
In my server config?
Re: Command isn't working properly -
Genuine - 03.06.2012
As said million times, if you ever get this error
And the sscanf2 file should contain this:
Quote:
native sscanf(const data[], const format[], {Float,_}:...);
native unformat(const data[], const format[], {Float,_}:...) = sscanf;
native SSCANF_Init(players, invalid, len);
native SSCANF_Join(playerid, const name[], npc);
native SSCANF_Leave(playerid);
|
And if it didnt, the file's not up to date.
Re: Command isn't working properly -
leonardo1434 - 03.06.2012
There's no doublt about your sscanf, Just update it and the command will work.
Re: Command isn't working properly -
cloudysky - 03.06.2012
I've just Updated sscanf, completely re-downloaded everything and compiled everything that needs to be compiled yet i'm still getting this error...
EDIT FIXED: For anyone else with this problem, delete ALL previous sscanf files. And make sure you are using the most recent pawno compiler. I was using an old one, but it was on my windows seven task bar so I kept compiling with that, so make sure you change it!