[HowTo] Create a simple registration system using dini!
#21

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);
Reply
#22

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 .
Reply
#23

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?
Reply
#24

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
Reply
#25

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
Reply
#26

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
Reply
#27

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
Reply
#28

I agree, very nice tutorial for new people.
Reply
#29

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.
Reply
#30

Very nice tutorial mate good job.
Reply
#31

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

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

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

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?
Reply
#35

Made it as a file:

Every step has been commented.
Reply
#36

Thanks dude
Reply
#37

Is it possible to get this to save gTeam as well?
Reply
#38

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

Код:
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.
Reply
#40

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)