[HowTo] Using dudb 2.4 to save money/stats/whatever (0.2#Ready)
#81

Alternatively, you should have your gamemode in pawno/include aswell as dudb and other include files. (like DracoBlue said).
Reply
#82



The gamemode is the AMX file


I Have
pawn Код:
#Include <DUDB>
But it still says:
Quote:

C:\PROGRA~1\ROCKST~1\GTASAN~1\LSLOGI~1\GAMEMO~1\sr c\lvdm.pwn(2) : fatal error 100: cannot read from file: "DUDB"

Reply
#83

'GAMEMO~1\src\lvdm.pwn(2)'

you are not editing the file in the pawno/include/lvdm.pwn folder .
Try to edit that one.

Kind regards,
Jan (DracoBlue)
Reply
#84

What do you mean, should I Copy And paste my Game mode (.pwn) into pawno / include? Then Edit which part?
Reply
#85

if you put the DUDB.inc right into the folder where your lvdm.pwn is (I mean gamemodes/src/lvdm.pwn) then you can put
#include "DUDB.inc"

Kind regards,
Jan (DracoBlue)
Reply
#86

Ok cool i have that sorted out but yet again like normal another problem...

It says it can't read dutils, so i make sure its in the pawno / include file, yes its there ,so i put it in the game mode file and the error message stays the same. any suggestions?
Reply
#87

Sorry, but whats the difference between dini and dudb? I'm using dini and it looks much easer (for me) than dudb.
Reply
#88

so how do you do it just with dini?
Reply
#89

Quote:
Originally Posted by n0ah
Sorry, but whats the difference between dini and dudb? I'm using dini and it looks much easer (for me) than dudb.
Depends on what you want to do.

Basicly you use dudb if you want to save encrypted passwords, save each to a crashsafe filename (for example *GM*Draco saves to _09GM_09DracoBlue.ini to prevent crashes) and have other functionalities, which you would have to create for users on your own.

So use dudb if you want to read/save user related content, save passwords, create logins and things like this. And if you want to save anything else: dini!

Kind regards,
Jan (DracoBlue)
Reply
#90

OK its shouting, 'Give up' I don't think i will ever be able to do it... I will start again and try,

Oh yeah Draco is there any chance that you can do a step by step list like:

1. Install Dini
2. Install DUDB
3. Install Dutils
4. Put in code...

you get what i mean. IF you could i would be hugely gratefull and so would others which has had trouble: You don't have to but it would be Good if you can.

Thank You Alot...
Miokie
Reply
#91

you wanted to say try my admin script
Reply
#92

hi,

i made a driver license script and want to save wether a player got one ore not but i really dont know how!?
erm i mean what ive to do that it save that? i tried to save it as team (if you got the license ur in the TEAM_LICENSED..)
but i dont work

plz help me!
solved..

now i got this code on OnPlayerDisconnect:
Код:
dUserSetINT(PlayerName(playerid)).("License",license[playerid]);
on my login in command:
Код:
license[playerid] = dUserINT(PlayerName(playerid)).("Level");
of course:
Код:
new license[MAX_PLAYERS];
it "works" and theres the line
Код:
License=0
in the scriptfiles file^^(and it changes from 0 to 1)
but when i reconnct the server its resetted to 0 ??

whats the prob?

just a very nubish mistake^^
forgot to change the "level" to "license" -.-

solved....

greetz

Reply
#93

Dunno if im doing this right.. lol

http://pastebin.com/d70d548ad

Im getting this error

(103) : warning 203: symbol is never used: "strtok"


Also this script interferes with my admin script with the whole /login /register thing, can i use this script in my admin script so that when a player registers and logs in, it registers and logs in the player as normal but also loads the money....gah i dunno if i've explained this well enough
Reply
#94

Quote:
Originally Posted by PyroAnger
Im getting this error

(103) : warning 203: symbol is never used: "strtok"
That's not error, it's warning.

pawn Код:
#pragma unused strtok
Reply
#95

Hi draco =P!

I'm a begginer in this =P and i'm trying scripting fo 3 days xD

But i'm undertanding slowly... =P

Well, the thing is that i'm trying this code... But i recibe errors...

Код:
C:\ARCHIV~1\ROCKST~1\GTASAN~1\FILTER~1\rswbs.pwn(59) : error 010: invalid function or declaration
C:\ARCHIV~1\ROCKST~1\GTASAN~1\FILTER~1\rswbs.pwn(88) : error 021: symbol already defined: "OnPlayerConnect"
C:\ARCHIV~1\ROCKST~1\GTASAN~1\FILTER~1\rswbs.pwn(93) : error 021: symbol already defined: "OnPlayerCommandText"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Well i search that wymbols, and i found them before 2 times...

First:

Код:
public OnPlayerCommandText(playerid,cmdtext[]) {
 return false;
}

public OnPlayerConnect(playerid) {
 return false;
}
And after:

Код:
 public OnPlayerConnect(playerid) {
 PLAYERLIST_authed[playerid]=false;
 return false;
}

public OnPlayerCommandText(playerid,cmdtext[]) {
 dcmd(login,5,cmdtext); // because login has 5 characters
 dcmd(register,8,cmdtext); // because register has 8 characters
 return false;
}
So i replace the first for the second...

But i have errors too... =(

Код:
C:\ARCHIV~1\ROCKST~1\GTASAN~1\FILTER~1\rswbs.pwn(18) : error 017: undefined symbol "PLAYERLIST_authed"
C:\ARCHIV~1\ROCKST~1\GTASAN~1\FILTER~1\rswbs.pwn(63) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Sorry for my english. Im from Argentina =)
Tanks since now ^^
Reply
#96

Heya

I have a small problem, I know i can use the

dUserSetINT to set a value.

For example:

if (strcmp(cmd, "/setlevel", true) == 0)
{
new slevel[MAX_STRING];
slevel = strtok(cmdtext, idx);
new ilevel = strval(slevel);
dUserSetINT(PlayerName(playerid)).("playerAdminLev el",ilevel);
SendClientMessage(playerid,color_positive,"Confirm ation: Level set successfully.");
return 1;
}

(This is only an example)
Code above would set the level of the user to the value of ilevel, however what if i dont want to reset the int to a new value. Instead I want to add the ilevel to the current value of the playerAdminLevel, can this be done?

(Sorry if this is a stupid question, but i'm pretty new to scripting).

- Tom
Reply
#97

Try that:
dUserSetINT(PlayerName(playerid)).("playerAdminLev el", dUserINT(PlayerName(playerid)).("playerAdminLevel" )+ilevel);

Happy coding,
Jan (DracoBlue)
Reply
#98

EDIT: Fixed, all works briliant.

Thanks Jan!

- Tom
Reply
#99

Help this is whats under OnPlayerConnect and disconnect, i made it so it would save money for everyname that comes on,heres the code
http://pastebin.com/m4cc9e593

that includes errors
Reply

pawn Код:
(GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")GetPlayerMoney(playerid)); // lol
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)