Help! DEATH POSITION.
#1

I want that when a player dies, a message says where he died.

I've made this:

http://pastebin.com/CuaWhFgG

But it returns me 3 warnings:

Код:
C:\Users\Jyxtro\Desktop\sampserver\gamemodes\jyxtro.pwn(91) : warning 202: number of arguments does not match definition
C:\Users\Jyxtro\Desktop\sampserver\gamemodes\jyxtro.pwn(91) : warning 202: number of arguments does not match definition
C:\Users\Jyxtro\Desktop\sampserver\gamemodes\jyxtro.pwn(91) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Please, explain me how to fix.

I want to learn, thank you.

(sorry for bad english, i'm italian)
Reply
#2

You need to format the message first so you can input the values into the string and then send the string.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        new Float:X,
            Float:Y,
            Float:Z,
            string[60];
        GetPlayerPos(playerid,X,Y,Z);
        format(string,sizeof(string),"Un tizio и morto a %f %f &f!", X, Y, Z);
        SendClientMessage(playerid,0xFFFFFF,string);
        return 1;
}
Reply
#3

It sends to me X and Y coordinates, but for the Z it says %f!

EDIT: Found the problem, it was &f and not %f.

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)