please help to remove warning
#1

Код:
C:\Documents and Settings\Prabhat\Desktop\World Stunting         V1.3.5\pawno\include\streamer.inc(449) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(714) : warning 219: local variable "string" shadows a variable at a preceding level
here is the pawn code

pawn Код:
if (strcmp("/bdesert", cmdtext, true, 10) == 0)
    {
        new string[60];
        new pName[MAX_PLAYER_NAME];
        DynUpdateStart(playerid);
        SetPlayerPos(playerid,3910.0881,393.6967,2.2406);
        SetPlayerFacingAngle(playerid, 177.6544);
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "TELE: %s has teleported to billionaire (/bdesert) ", pName);
        SendClientMessageToAll(COLOR_CYAN, string);
    return 1;
    }
Reply
#2

Quote:
Originally Posted by MA_proking
Посмотреть сообщение
Код:
C:\Documents and Settings\Prabhat\Desktop\World Stunting         V1.3.5\pawno\include\streamer.inc(449) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Prabhat\Desktop\lvdm.pwn(714) : warning 219: local variable "string" shadows a variable at a preceding level
here is the pawn code

pawn Код:
if (strcmp("/bdesert", cmdtext, true, 10) == 0)
    {
        new string[60];
        new pName[MAX_PLAYER_NAME];
        DynUpdateStart(playerid);
        SetPlayerPos(playerid,3910.0881,393.6967,2.2406);
        SetPlayerFacingAngle(playerid, 177.6544);
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "TELE: %s has teleported to billionaire (/bdesert) ", pName);
        SendClientMessageToAll(COLOR_CYAN, string);
    return 1;
    }
What line is the warning coming from?
Reply
#3

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
What line is the warning coming from?
Код:
new string[60];
from here
Reply
#4

It seems you may have string defined globally. Simply remove it.

Example:
PHP код:
new string[128]; //Remove this one.
public OnPlayerConnect(playerid)
{
    new 
string[128];

Reply
#5

Quote:
Originally Posted by MA_proking
Посмотреть сообщение
Код:
new string[60];
from here
try to change that to

PHP код:
    new string[256]; 
Reply
#6

Quote:
Originally Posted by Kush
Посмотреть сообщение
It seems you may have string defined globally. Simply remove it.

Example:
PHP код:
new string[128]; //Remove this one.
public OnPlayerConnect(playerid)
{
    new 
string[128];

Thanks its work lemme try in game
Reply
#7

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
try to change that to

PHP код:
    new string[256]; 
.....?

Quote:
Originally Posted by MA_proking
Thanks its work lemme try in game
No problem
Reply
#8

Quote:
Originally Posted by Kush
Посмотреть сообщение
.....?



No problem
/Facepalm its 1:30 COME ONNN!! URGG
Reply
#9

Thanks Kush and Shockey HD for help
and Kush thanks it work in game too
Reply
#10

Quote:
Originally Posted by MA_proking
Посмотреть сообщение
Thanks Kush and Shockey HD for help
and Kush thanks it work in game too
No problem (again) and Good Luck!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)