Bug help
#1

Greetings! Got a bug in my script. I made a command, and tested it out IG. When I use the command, nothing happens. Here's the code.

PHP код:
//The command
CMD:learnskill(playeridparams[])
{
     if(
IsPlayerConnected(playerid))
     {
          
LearnDialog(playerid);
    }
    return 
1;
}
//LearnDialog(playerid)
stock LearnDialog(playerid)
{
    new 
string[613];
    new 
hstring[65];
    
format(hstringsizeof(hstring), "Choose the skill/ability you wish to learn: (%d Learning Points)"PlayerInfo[playerid][pLearn]);
    switch(
PlayerInfo[playerid][pSpecial])
    {
         case 
1://Humans
         
{
              
format(stringsizeof(string), "Unarmed/Strength (Learned Rank: %d/3)\nKnife (Learned Rank: %d/5)\nKatana (Learned Rank: %d/3)\nColt 45 (Learned Rank: %d/3)\n",
            
Skills[playerid][Unarmed],Skills[playerid][Knife],Skills[playerid][Katana], Skills[playerid][Colt45]);
            return 
1;
        }
    }
    return 
1;

Yes, I have tried changing to Human class, but it still doesn't work. I even tried changing to all classes.
Reply
#2

You just format the text, you never show a dialog and let the player select an option.
Reply
#3

Oops. That's a shame. Didn't see that. Sorry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)