Game Text help?
#1

Hi guys, so I decided to create a kind-of useful filterscript, but I'm getting an error.
I will just show you my codes for some help:
pawn Код:
if(dialogid == 102)
    {
        if(response)
        {
                new inputtext3;
                ChosenText = inputtext3;
                SendClientMessage(playerid, -1, "Done! You have successfully created the game text for everyone!");
                GameTextForAll(ChosenText,"inputtext2 * 1000", ChosenStyle);
                return 1;
        }
          }
So after you type something in the dialog(last step), it must send game text to everyone, etc..

Now I'm getting these errors:
Код:
error 035: argument type mismatch (argument 1)
warning 204: symbol is assigned a value that is never used: "ChosenText"
Hopefully when I wake up tomorrow, I will see an answer to this so I can release it.
Thank you!
Reply
#2

Dude do you have this ChosenText as global variable
Reply
#3

EDIT:
So I remove the time from the system, but now it doesn't show anything on the screen.
Here is my code:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i) == 1)
                    {
                        new string[128];
                        format(string, sizeof(string), "%s", inputtext3);
                        switch(ChosenStyle)
                        {
                        case 0:
                            {
                            GameTextForPlayer(i, string, 1, 0);
                            }
                        case 1:
                            {
                            GameTextForPlayer(i, string, 1, 1);
                            }
                        case 5:
                            {
                            GameTextForPlayer(i, string, 1, 5);
                            }
                        }
                    }
                }
Reply
#4

PHP код:
if(dialogid == 102)
    {
        if(
response)
        {
                new 
inputtext3;
                
ChosenText inputtext3;
                
SendClientMessage(playerid, -1"Done! You have successfully created the game text for everyone!");
                
GameTextForAll(ChosenText,1000ChosenStyle);//You're not calling any inputtext2 function here..
                
return 1;
        }
   } 
Reply
#5

@ThePhenix, I changed my code, so if you could please help on that..
Before, I was having a problem that it sends the game text for like 5 milli seconds lol, then I removed the time input, and added the gametexts which appear for some time(IDs 0, 1, and 5), but now it won't show anything on the screen.
Reply
#6

Quote:
Originally Posted by JimmyCh
Посмотреть сообщение
EDIT:
So I remove the time from the system, but now it doesn't show anything on the screen.
Here is my code:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i) == 1)
                    {
                        new string[128];
                        format(string, sizeof(string), "%s", inputtext3);
                        switch(ChosenStyle)
                        {
                        case 0:
                            {
                            GameTextForPlayer(i, string, 1, 0);
                            }
                        case 1:
                            {
                            GameTextForPlayer(i, string, 1, 1);
                            }
                        case 5:
                            {
                            GameTextForPlayer(i, string, 1, 5);
                            }
                        }
                    }
                }
GameTextForPlayer(const string[], time, style)
time The time you want the text to show up. This is in milliseconds.
https://sampwiki.blast.hk/wiki/GameTextForAll

Your time is set to 1 milliseconds, that's why It's not visible. Change it to 1000 = 1 second or 2000 = 2 seconds.
Reply
#7

But if you check the game text type, I chose the ones with constant timing, 8-9 seconds and 3 seconds, that's why I've set my time to that, might be the problem?
Reply
#8

Anyways..

https://sampwiki.blast.hk/wiki/GameTextForPlayer

The time is in milliseconds and you have set it to 1.
Reply
#9

Dude, I just set it to 10000 and it's still not appearing.
Plus I told you the game text style I chose has a constant timing..
Even after I changed to 10000 it still doesn't show..
Reply
#10

Look at this example:
PHP код:
#define DIALOG_DSAY 0
CMD:dsay(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_DSAYDIALOG_STYLE_INPUT"Game Text""Please insert the Game Text For Player""Ok""Close");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_DSAY:
        {
            if(
response)
            {
                
GameTextForAll(inputtext30005);
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)