help with a command i have 1 error
#1

this is the command
PHP код:
if(strcmp(cmd"/setworld"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /setvw [playerid/PartOfName] [virworldid]");
                return 
1;
            }
            new 
playa;
            
playa ReturnUser(tmp);
            new 
virid;
            
tmp strtok(cmdtextidx);
            
virid strval(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(
IsPlayerConnected(playa))
                {
                    if(
playa != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(playagiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
SetPlayerVirtualWorld(playavirid);
                        
format(stringsizeof(string), "   You have set %s virtual world to %d."giveplayervirid);
                        
SendClientMessage(playeridCOLOR_GRAD1string);
                        
format(stringsizeof(string), "   %s have set your virtual world to %d."sendernamevirid);
                        
SendClientMessage(playaCOLOR_GRAD1string);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   You are not authorized to use that command!");
            }
        }
        return 
1;
    } 
i have this errorr
(6747) : error 017: undefined symbol "sendername" ==>>> GetPlayerName(playerid, sendername, sizeof(sendername));
Reply
#2

PHP код:
new sendername[MAX_PLAYER_NAME];
    
GetPlayerName(playeridsendernamesizeof(sendername));
    
format(stringsizeof(string), "users/%s.ini"sendername); 
Reply
#3

i have this warnings
(8660) : warning 219: local variable "sendername" shadows a variable at a preceding level
(8674) : warning 219: local variable "sendername" shadows a variable at a preceding level
(10761) : warning 219: local variable "sendername" shadows a variable at a preceding level
(10951) : warning 219: local variable "sendername" shadows a variable at a preceding level
Reply
#4

Oh my gosh http://forum.sa-mp.com/showpost.php?...33&postcount=8
Reply
#5

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Lol, He's using Strcmp
Reply
#6

Quote:
Originally Posted by G4M3Ov3r
Посмотреть сообщение
Lol, He's using Strcmp
How can I know?
Anyway I mean he didn't need to create another topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)