Need Help ASAP With Dialogs +REP Awaiting
#1

Hello
I have a Big Deal Here its very simple
PHP код:
stock ClassDialog(playerid)
{
new 
Stringg[600];
    
format(Stringgsizeof(Stringg),""cred"Musketter - Rank 0\n"cblue"Smugller - Rank 0\n"cyellow"Pirate- Rank 2\n"ccolor"Sky Walker - Rank 6\n"ccolor"Engineer - "ccolor2"Rank 5\n"ccolor"JetTrooper - "ccolor2"Rank 6\n"ccolor"Support - "ccolor2"Rank 5\n"ccolor"Scout - "ccolor2"Rank 5\n"ccolor"Spy - "ccolor2"Rank 7\n"ccolor"Donor - "ccolor2"For Donators only\n"ccolor"Builders - "ccolor2"Rank 3\n"cblue"God Father");
     
ShowPlayerDialog(playeridCLASS_DIALOGDIALOG_STYLE_LIST"Class Selection",Stringg,"Select","Back");
    return 
1;

sorry i cant post full code but ill let u know that colors cred , cblue etc etc are define and in onDialogResponse there are 11 cases
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
strfind(inputtext,"%",true) != -1) return SendClientMessage(playeridRED," ");
if(
dialogid == CLASS_DIALOG)
{
   if(!
response)
   {
   }
   else if(
response)
   {
       switch(
listitem)
       {
           case 
0:
           {
                       Class[
playerid] = Musketer;
                       
SendClientMessage(playerid, -1,"You have chosen the Musketter class");
                       
SendClientMessage(playerid, -1,"BONUS: No extra bonus with this class");
                       
SpawnPlayer(playerid);
                       
UpdateLabelText(playerid);
           }
                   case 
1:
                  {
                     
" "
                      
}
                       ..........
                      case 
11:
                      {
                       
" "
                        
}
           }
   }

Over all the Code is perfect but if I add \n"cblue"GodFather" my 11th option of the dialog then while compiling it will crash
And if i Delete \n"cblue"GodFather" I tried my best to fix it when i failed im here , Again the problem is if i add an 11 th case it wont crash in ondialogresponse but if i add its 11th option in my dialog it will .
i can post the whole code if u want but it wont make any difference .
Sorry for my Bad English
Reply
#2

It may be because the string for a dialog has reached its maximum length
Reply
#3

ya i know it but I need help on How to Fix it
Reply
#4

Just Create a new dialog for the balance and add a item like next or something
Reply
#5

Learn strcat
Reply
#6

OK What a Waste of Posting I just Reduced the Characters.
Thank you for commenting Superrobot
+Reputed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)