Little Help
#1

I give this code!
pawn Код:
if (dialogid == 654)
    {
        if (strcmp("info", text, true, 10) == 0)
        {
            new targetid;
            new str[256], pName[24], IP[16];
            new Money = GetPlayerMoney(targetid);
            GetPlayerName(targetid, pName, 24);
            GetPlayerIp(targetid,IP,sizeof IP);
            format(str, 256, ""embed_blue"=======================[%s's PLAYER STATS "embed_blue"]=======================", pName);
            SendClientMessage(playerid,COLOR_WHITE,str);
            format(str,128, ""embed_blue"%s: IP[%s] - Money[$%i] - Kills[%i] - Deaths[%i] - Admin[%i] - Skin[%i]",pName, IP, Money, PlayerInfo[targetid][pKills], PlayerInfo[targetid][pDeaths], PlayerInfo[targetid][pAdminLevel], GetPlayerSkin(targetid));
            SendClientMessage(playerid,COLOR_WHITE,str);
            return 1;
        }
    }
This is error
Код:
C:\Documents and Settings\Korisnik\My Documents\Downloads\samp03dsvr_win32(1)\gamemodes\SpiderWalk.pwn(1013) : error 017: undefined symbol "text"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

new text[128];

^ if its a string of text

new text;

^ if its a number with no more after the decial point

new float:text;

^ if its a number like 5.67876

put it at the top of your script under includes, i think thats it anyway

also dont use str its shit, use :

PHP код:
CMD:commandplayeridparams[ ] )
{
    
//command here
    
return 1;

Reply
#3

Its doesnt work look at this warning
Код:
C:\Documents and Settings\Korisnik\My Documents\Downloads\samp03dsvr_win32(1)\gamemodes\SpiderWalk.pwn(218) : warning 219: local variable "text" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#4

EDIT: shadowing means you used it else where, either call " text " something else, or if its that same variable for a reason, make sure its at the top :

PHP код:
#include <SAMP>
new text
putting it at the top enables it to be used throughout the script instead of using it under a command where it can only be used in that command
Reply
#5

look i want to make this:When player click on player to admin shows dialog.Then to admin input in dialog 'info' and to shows that player stats capish?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)