Bug 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: Bug help (
/showthread.php?tid=618714)
Bug help -
NealPeteros - 09.10.2016
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(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
LearnDialog(playerid);
}
return 1;
}
//LearnDialog(playerid)
stock LearnDialog(playerid)
{
new string[613];
new hstring[65];
format(hstring, sizeof(hstring), "Choose the skill/ability you wish to learn: (%d Learning Points)", PlayerInfo[playerid][pLearn]);
switch(PlayerInfo[playerid][pSpecial])
{
case 1://Humans
{
format(string, sizeof(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.
Re: Bug help -
Konstantinos - 09.10.2016
You just format the text, you never show a dialog and let the player select an option.
Re: Bug help -
NealPeteros - 09.10.2016
Oops. That's a shame. Didn't see that. Sorry