SA-MP Forums Archive
[HowTo] Create a simple registration system using dini! - 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: [HowTo] Create a simple registration system using dini! (/showthread.php?tid=47131)

Pages: 1 2 3


Re: [HowTo] Create a simple registration system using dini! - mamorunl - 29.08.2008

Quote:
Originally Posted by Maniac_X
So i tried screwing around a bit seeing if there was a way to identify that string properly but naturaly being so new to this stuff it made it worse not better so i ended up copying the original code back again from this topic post. however it came back with the same string error

Code:
.pwn(193) : error 037: invalid string (possibly non-terminated string)
.pwn(193) : error 029: invalid expression, assumed zero
.pwn(193) : error 029: invalid expression, assumed zero
.pwn(193) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
and the line that it's referring to is :

Code:
//     PLAYER    LOGIN   SCRIPT
dcmd_login(playerid, params[])
{
  new file[256];                               //190
  new string[256], pname[MAX_PLAYER_NAME];          //191
  GetPlayerName(playerid, pname, sizeof(pname));        //192
  format(file, sizeof(string), "\\Users\\%s.ini, pname);      //193
I think i'm Jynxd
193: format(file, sizeof(file), "\\Users\\%s.ini", pname);


Re: [HowTo] Create a simple registration system using dini! - Maniac_X - 30.08.2008

So with that 2nd error the one i mentioned that is occuring at line 206.. does that mean my inc files are screwed.

If so does someone have a linke to a download of the 3 inc's needed that i could use as the ones listed in this post failed to download .


Re: [HowTo] Create a simple registration system using dini! - Blt950 - 30.08.2008

I got a error >
Code:
.pwn(1095) : error 017: undefined symbol "dini_IntGet"
And the line>
Code:
level[playerid] = dini_IntGet(file, "level");
how to fix it?


Re: [HowTo] Create a simple registration system using dini! - HB - 30.08.2008

Quote:
Originally Posted by Blt950
I got a error >
Code:
.pwn(1095) : error 017: undefined symbol "dini_IntGet"
And the line>
Code:
level[playerid] = dini_IntGet(file, "level");
how to fix it?
IntGet doesn't exist. Use dini_Int


Re: [HowTo] Create a simple registration system using dini! - Blt950 - 30.08.2008

Quote:
Originally Posted by Trex
Quote:
Originally Posted by Blt950
I got a error >
Code:
.pwn(1095) : error 017: undefined symbol "dini_IntGet"
And the line>
Code:
level[playerid] = dini_IntGet(file, "level");
how to fix it?
IntGet doesn't exist. Use dini_Int
I tryed and it complies with some byte text .. somthing over.. donno
and In game when i try to register "/register mypass"
then it's just say> USAGE:/register [password]

so it's wierd


Re: [HowTo] Create a simple registration system using dini! - bogeymanEST - 30.08.2008

Quote:
Originally Posted by Blt950
I tryed and it complies with some byte text .. somthing over.. donno
and In game when i try to register "/register mypass"
then it's just say> USAGE:/register [password]

so it's wierd
My bad, change the if(!strval in your /register command to if(!strlen


Re: [HowTo] Create a simple registration system using dini! - Blt950 - 30.08.2008

Quote:
Originally Posted by bogeyman_EST
Quote:
Originally Posted by Blt950
I tryed and it complies with some byte text .. somthing over.. donno
and In game when i try to register "/register mypass"
then it's just say> USAGE:/register [password]

so it's wierd
My bad, change the if(!strval in your /register command to if(!strlen
It looks good.. but now when i do /register mypass
then the console (server console) crash and closes


Re: [HowTo] Create a simple registration system using dini! - [Jay] - 30.08.2008

I agree, very nice tutorial for new people.


Re: [HowTo] Create a simple registration system using dini! - bogeymanEST - 30.08.2008

Quote:
Originally Posted by Blt950
It looks good.. but now when i do /register mypass
then the console (server console) crash and closes
Do you have the Users folder in your scriptfiles folder? If not, please create it, that might have caused the crash.


Re: [HowTo] Create a simple registration system using dini! - aleksandra - 28.03.2009

Very nice tutorial mate good job.


Re: [HowTo] Create a simple registration system using dini! - Burridge - 03.04.2009

this is a very nice tut, is there a way to make it save teams aswell?


Re: [HowTo] Create a simple registration system using dini! - bogeymanEST - 03.04.2009

If you use SetPlayerTeam to save teams:
pawn Код:
dini_IntSet(file, "team", GetPlayerTeam(playerid));



Re: [HowTo] Create a simple registration system using dini! - Burridge - 05.04.2009

Quote:
Originally Posted by bogeyman_EST
If you use SetPlayerTeam to save teams:
pawn Код:
dini_IntSet(file, "team", GetPlayerTeam(playerid));
thanks.


Re: [HowTo] Create a simple registration system using dini! - XziPer2007 - 11.04.2009

Would it be possible if you could release a .pwn file whit the code in it, cuz tbh, i dont know where to write everything, so i only mess it up >_< and i've really been looking for code so i can create a login system to my own GM :<

If you dont want to, in which callback do you need to get the code in so it works?


Re: [HowTo] Create a simple registration system using dini! - bogeymanEST - 12.04.2009

Made it as a file:

Every step has been commented.


Re: [HowTo] Create a simple registration system using dini! - XziPer2007 - 12.04.2009

Thanks dude


Re: [HowTo] Create a simple registration system using dini! - [SL]Shadowed - 28.04.2009

Is it possible to get this to save gTeam as well?


Re: [HowTo] Create a simple registration system using dini! - bogeymanEST - 29.04.2009

Quote:
Originally Posted by [URP
Shadowed ]
Is it possible to get this to save gTeam as well?
pawn Код:
dini_IntSet(file, "team", gTeam[playerid]);



Re: [HowTo] Create a simple registration system using dini! - Andom - 29.04.2009

Код:
new file[256];
new string[256];
new tmp[256];
Didn't any of you guys learned that you're wasting very mutch memory and cpu right now?

- string (chatbox) could never be longer then 128, so convert to new string[128];
- file is minimum 24 (length of the max. name) + some // before that, let's say new file[32];
- tmp could also never be longer then 128 because of the chatbox, but i dont think your password needs the whole chatbox, to conver that also to new tmp[32];

You have now saved 576 memory, only for 1 command.



Re: [HowTo] Create a simple registration system using dini! - michael_dark_1 - 03.09.2011

wtf??!! look the errors appear on me!!


C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(95) : error 017: undefined symbol "dmcd"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(102) : error 017: undefined symbol "params"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(102) : error 017: undefined symbol "COLOR_RED"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(103) : error 017: undefined symbol "dini_Exists"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(103) : error 017: undefined symbol "COLOR_RED"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(104) : error 017: undefined symbol "dini_Create"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(105) : error 017: undefined symbol "dini_IntSet"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(106) : error 017: undefined symbol "dini_Set"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(107) : error 017: undefined symbol "dini_IntSet"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(10 : error 017: undefined symbol "dini_IntSet"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(109) : error 017: undefined symbol "dini_IntSet"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(111) : error 017: undefined symbol "params"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(112) : error 017: undefined symbol "COLOR_YELLOW"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(114) : error 017: undefined symbol "COLOR_YELLOW"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(115) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(117) : warning 225: unreachable code
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(117) : warning 217: loose indentation
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(119) : error 017: undefined symbol "dmcd"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(127) : error 017: undefined symbol "params"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(127) : error 017: undefined symbol "COLOR_RED"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(12 : error 017: undefined symbol "dini_Exists"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(12 : error 017: undefined symbol "COLOR_RED"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(129) : error 017: undefined symbol "COLOR_RED"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(131) : error 017: undefined symbol "dini_Int"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(132) : error 017: undefined symbol "udb_hash"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(135) : error 017: undefined symbol "COLOR_RED"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(140) : error 017: undefined symbol "dini_Int"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(141) : error 017: undefined symbol "dini_Int"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\Michael.pwn(142) : error 017: undefined symbol "dini_Int"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.