Help "inputtext"
#1

Hi

Can someone tell me why it wont make me links.sav file when I put the link into DIALOG_INPUT


PHP код:
#include <a_samp>
#include <dini>
#include <zcmd>
#define links "LINKS/link.sav"
CMD:myradio(playeridparams[])
{
ShowPlayerDialog(playerid,1000010DIALOG_STYLE_INPUT"YT LINK""Enter your ******* LINK:""OK""Cancel");
return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 1000010)
{
if(!
response)
{
switch(
listitem)
{
case 
0:
{
new 
idt[100],ft[256];
format(ft,sizeof(ft),"%s",inputtext);
dini_Set(links,idt,ft);
}
}
}
}
return 
1;

Reply
#2

I'm not very familiar with dini, but I see that you created "idt" but you never did anything with it. In other words, idt is a blank string.

If you want to save "ft" to a value called "idt," you would use:

Код:
dini_Set(links,"idt",ft);
Reply
#3

now i have got this error

PHP код:
warning 204symbol is assigned a value that is never used"idt" 
Reply
#4

You don't need the new string idt anymore.

Delete:

pawn Код:
new idt[100]
Reply
#5

now i have got this code but still nothing happens

PHP код:
#include <a_samp>
#include <dini>
#include <zcmd>
#define links "LINKS/link.sav"
CMD:myradio(playeridparams[])
{
ShowPlayerDialog(playerid,1000010DIALOG_STYLE_INPUT"YT LINK""Enter your ******* LINK:""OK""Cancel");
return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 1000010)
{
if(!
response)
{
switch(
listitem)
{
case 
0:
{
new 
ft[256];
format(ft,sizeof(ft),"%s",inputtext);
dini_Set(links,ft,"idt");
}
}
}
}
return 
1;

Reply
#6

You copied the code I posted wrong. The "idt" is supposed to go before the ft. The way you have now it now it is still using a blank string as the name of the value -- which will produce no results. Switch the "idt" and ft around.
Reply
#7

Now I have got this code but still nothing

PHP код:
#include <a_samp>
#include <dini>
#include <zcmd>
#define links "LINKS/link.sav"


CMD:myradio(playeridparams[])
{
ShowPlayerDialog(playerid,1000010DIALOG_STYLE_INPUT"YT LINK""Enter your ******* LINK:""OK""Cancel");
return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 1000010)
{
if(!
response)
{
switch(
listitem)
{
case 
0:
{
new 
ft[256];
format(ft,sizeof(ft),"%s",inputtext);
dini_Set(links,"idt",ft);
}
}
}
}
return 
1;

Reply
#8

Please anyone help
Reply
#9

Are you sure you made a folder named LINKS?
Reply
#10

Yes!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)