SA-MP Forums Archive
Help "inputtext" - 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: Help "inputtext" (/showthread.php?tid=432193)



Help "inputtext" - kalanerik99 - 21.04.2013

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;




Re: Help "inputtext" - RVRP - 21.04.2013

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);



Re: Help "inputtext" - kalanerik99 - 21.04.2013

now i have got this error

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



Re: Help "inputtext" - RVRP - 21.04.2013

You don't need the new string idt anymore.

Delete:

pawn Код:
new idt[100]



Re: Help "inputtext" - kalanerik99 - 21.04.2013

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;




Re: Help "inputtext" - RVRP - 21.04.2013

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.


Re: Help "inputtext" - kalanerik99 - 21.04.2013

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;




Re: Help "inputtext" - kalanerik99 - 21.04.2013

Please anyone help


Re: Help "inputtext" - Faisal_khan - 21.04.2013

Are you sure you made a folder named LINKS?


Re: Help "inputtext" - kalanerik99 - 22.04.2013

Yes!