Little Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little Help (
/showthread.php?tid=301241)
Little Help -
SpiderWalk - 03.12.2011
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.
Re: Little Help -
English-Conceptz - 03.12.2011
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:command( playerid, params[ ] )
{
//command here
return 1;
}
Re: Little Help -
SpiderWalk - 03.12.2011
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.
Re: Little Help -
English-Conceptz - 03.12.2011
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
Re: Little Help -
SpiderWalk - 03.12.2011
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?