SphereCommunity
Register Script and Gump - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Register Script and Gump (/Thread-Register-Script-and-Gump)



Register Script and Gump - larmc20 - 06-02-2013 05:00 AM

Hello Guys, I have made a gump register menu but I have a doubt. How can I make the OKAY button to, when pressed, record the lines and save in a SCP file on Accounts folder? To save a list like
login
Password
Full Name (Nome Completo)
E-mail
Rg (Personal Brazilian Id)

Can you Help me doing that?

Have a look [Image: menucadastro.png]

PHP Code:
// Created 01/06/2013 15:48:03, with Gump Studio.
// Exported with with SphereExporter ver 1.1.
// Script for 0.56/Revisions

[DIALOG d_cadastros]
99,51
NOCLOSE
NOMOVE
NODISPOSE
page 0
resizepic 93 52 9200 354 388
gumppic 197 70 100
text 235 84 0 0
text 218 125 0 1
gumppic 90 27 52
htmlgump 175 184 200 100 2 1 1
gumppic 102 296 2430
textentry 120 301 308 20 0 1 3
textentry 117 332 308 20 0 2 4
textentry 120 362 304 20 0 3 5
button 235 411 247 248 1 0 0

[DIALOG d_cadastros text]
Bem-Vindo
Conamidia Shard
Boa tarde
Seja bem vindo ao Conamíia ShardAqui você encontrará aventuras e diversão com outros jogadoresRespeite os jogadores assim como o servidorO intuito do servidor e proporcionar diversão a todosCaso encontre algum bugfavor contatar os resposáveis pelos servidor.

Nome Completo
E
-mail
RG

[DIALOG d_cadastros button]
ON=0
// Button 1
// 


[EOF

I was thinking doing like
PHP Code:
[DIALOG d_cadastros button]
ON=0
// Button 1
// 
Writefile contas/<tag.newbmenu.defname>.scp
 SYSMESSAGE 
@044,,1 Cadastro [<TAG.src.name>] successfully saved

But How can I do to the button take the words which fill those TEXT ENTRIES and save in the file?


RE: Register Script and Gump - Mordaunt - 06-02-2013 06:18 AM

Your text entries are recorded as:

<ARGTXT[0]>
<ARGTXT[1]>
<ARGTXT[2]>


RE: Register Script and Gump - larmc20 - 06-02-2013 06:35 AM

Well, so let me try, see if its correct please.
PHP Code:
[DIALOG d_cadastros button]
ON=0 3  
// Button 1
TAG.NAME <ARGTXT[1]> 
TAG.EMAIL <ARGTXT[2]>           
TAG.RG <ARGTXT[3]>
WRITEFILE CONTAS/<TAG.CONTAS>.scp NAME=<TAG.NAME>
WRITEFILE CONTAS/<TAG.CONTAS>.scp EMAIL=<TAG.EMAIL>
WRITEFILE CONTAS/<TAG.CONTAS>.scp RG=<TAG.RG



RE: Register Script and Gump - Mordaunt - 06-02-2013 12:15 PM

You shouldn't need to tag them honestly

Code:
WRITEFILE CONTAS/<TAG.CONTAS>.scp NAME=<ARGTXT[1]>
WRITEFILE CONTAS/<TAG.CONTAS>.scp EMAIL=<ARGTXT[2]>
WRITEFILE CONTAS/<TAG.CONTAS>.scp RG=<ARGTXT[3]>

should work fine.


RE: Register Script and Gump - larmc20 - 06-02-2013 03:40 PM

Still not working =//... It is not creating the file in the folder contas. I tried to change the name of the file.scp but still not working =//!
[DIALOG d_cadastros button]
ON=0
// Button 1
//

wRITEFILE CONTAS/cadastros.scp NAME=<ARGTXT[1]>
WRITEFILE CONTAS/Cadastros.scp EMAIL=<ARGTXT[2]>
WRITEFILE CONTAS/Cadastros.scp RG=<ARGTXT[3]>


RE: Register Script and Gump - Rattlehead - 06-02-2013 06:23 PM

first of all, the folder has to exist, if there is no folder, then u will get an error

second, why keep the name of the folder in a tag?? seems like to me the folder name will always be the same anyway, correct me if i am wrong.

third, are you sure you have the correct folder name saved in 'tag.contas' ?

you should try;

WRITEFILE cadastros.scp NAME=<ARGTXT[1]>
WRITEFILE Cadastros.scp EMAIL=<ARGTXT[2]>
WRITEFILE Cadastros.scp RG=<ARGTXT[3]>

just to see if it works, this will end up in ur main sphere folder, if it does, then you have folder naming issues.


RE: Register Script and Gump - larmc20 - 06-03-2013 01:22 AM

Hey mates, It worked really fine...
Thank you so much.
I have done like

[DIALOG d_cadastros button]
ON=0
WRITEFILE cadastros.scp Conta=<src.account>
wRITEFILE cadastros.scp NAME=<ARGTXT[1]>
WRITEFILE Cadastros.scp EMAIL=<ARGTXT[2]>
WRITEFILE Cadastros.scp RG=<ARGTXT[3]>

Now I can see the account; NAME; E-MAIL; RG(PERSONAL ID) in a file...

Thank you both


RE: Register Script and Gump - babazar - 07-17-2013 11:46 PM

do u have an english version?