How do i get rid of these warnings?!?
#1

Hi i'm trying to make a FS, but i keep getting these Warnings, how can i get rid of them?

Код:
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(158) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(158) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(173) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(173) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(187) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(187) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(194) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(194) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(201) : warning 202: number of arguments does not match definition
C:\Users\Chrillzen\Desktop\Allt\SAMP\filterscripts\S-Cheats.pwn(201) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Warnings.
This is from one warning.

Код:
     format(string, sizeof(string), "%s, you recieved armor, health and money.", GetPlayerName(playerid));
     SendClientMessage(playerid, COLOR_GREEN, string);
Reply
#2

new name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

format(string, sizeof(string), "%s, you recieved armor, health and money.",name);
SendClientMessage(playerid, COLOR_GREEN, string);
Reply
#3

Ohh thanks!
XD

EDIT: It does not get the playername, it just sais ,you recived..
Reply
#4

mhmh, strange
Reply
#5

pawn Код:
stock GetPlayerName(playerid)
{
    new name[20]; // max player name allowed
    GetPlayerName(playerid, name, 20);
    return name;
}
If you use "GetPlayerName"
Reply
#6

Quote:
Originally Posted by Claude
Посмотреть сообщение
pawn Код:
stock GetPlayerName(playerid)
{
    new name[20]; // max player name allowed
    GetPlayerName(playerid, name, 20);
    return name;
}
If you use "GetPlayerName"
Thought GetPlayerName is already defined by default,

Anyways, here's an example of usage;

https://sampwiki.blast.hk/wiki/GetPlayerName
Reply
#7

pawn Код:
new pname[MAX_PLAYER_NAME]; //Defining pname as player's in-game name.
new string[156]; // Defining the string
GetPlayerName(playerid, pname, sizeof(pname)); // Using pname as getting player's name
format(string,sizeof(string), "%s, you received armor, health and money", pname); // Formating the string
SendClientMessage(playerid, COLOUR, string);
Reply
#8

Код:
     
     new string[128];
     new name[MAX_PLAYER_NAME];
     GetPlayerName(playerid, name, sizeof(name));
     format(string, sizeof(string), "%s, you recieved armor, health and money.", name));
     SendClientMessage(playerid, COLOR_GREEN, string);
Reply
#9

pawn Код:
GetPlayerName(playerid, string, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s, you recieved armor, health and money.", string);
SendClientMessage(playerid, COLOR_GREEN, string);
Reply
#10

Quote:
Originally Posted by bestr32
Посмотреть сообщение
pawn Код:
new pname[MAX_PLAYER_NAME]; //Defining pname as player's in-game name.
new string[156]; // Defining the string
GetPlayerName(playerid, pname, sizeof(pname)); // Using pname as getting player's name
format(string,sizeof(string), "%s, you received armor, health and money", pname); // Formating the string
SendClientMessage(playerid, COLOUR, string);
You bumped a thread from 2010. Good job, mate.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)