Author Topic: [INCLUDE UNTESTED] NE Database system  (Read 9538 times)

0 Members and 1 Guest are viewing this topic.

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
[INCLUDE UNTESTED] NE Database system
« on: August 09, 2014, 06:54:08 pm »
Hello, guys!
Heres my second include. It adds a database function (not mysql) to your script.
Functions:
Code: [Select]
stock nedbset(entry[], point1[], point2[], data[])//entry: The entry you want to edit, data: The variable you want to edit in entry, point: The string you want to set the variable to.
stock nedbget(entry[], point1[], point2[])//Gets a variable info
:::nedbint:::same as nedbget but return integer
:::nedbfloat:::same as nedbget but return float
Note: You have to make an empty file named ndb.sys in scriptfiles for it to work.
No longer needed
Download:
http://www.solidfiles.com/d/ca77b88a6d/nedb.inc
Did it work for you? Tell in the replies!
« Last Edit: August 14, 2014, 12:30:07 pm by NE.Restricted »
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #1 on: August 10, 2014, 12:24:09 pm »
Updated to include a note.
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline The_Lucifer

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #2 on: August 11, 2014, 05:29:43 am »
Hi, i installed your database script, but it gives me 3 errors, wich i fixed one

BEFORE: while(v2[count] != null&&found==0)

AFTER: while(v2[count][0] != null&&found==0)

But now i have 2 errors and i cant fix them, can you help me please?

C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(14) : error 048: array dimensions do not match

C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(32) : error 033: array must be indexed (variable "result")

Thanks :D
« Last Edit: August 11, 2014, 05:31:15 am by The_Lucifer »

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #3 on: August 11, 2014, 12:19:04 pm »
Hi, i installed your database script, but it gives me 3 errors, wich i fixed one

BEFORE: while(v2[count] != null&&found==0)

AFTER: while(v2[count][0] != null&&found==0)

But now i have 2 errors and i cant fix them, can you help me please?

C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(14) : error 048: array dimensions do not match

C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(32) : error 033: array must be indexed (variable "result")

Thanks :D
I will try to fix it.
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #4 on: August 11, 2014, 12:35:12 pm »
Hi, i installed your database script, but it gives me 3 errors, wich i fixed one

BEFORE: while(v2[count] != null&&found==0)

AFTER: while(v2[count][0] != null&&found==0)

But now i have 2 errors and i cant fix them, can you help me please?

C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(14) : error 048: array dimensions do not match

C:\Users\The_Lucifer\Desktop\The Matrix Revolucion Latino\pawno\include\nedb.inc(32) : error 033: array must be indexed (variable "result")

Thanks :D
fixxxed
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline The_Lucifer

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #5 on: August 11, 2014, 07:48:07 pm »
Thanks :D, but now when i put the cmd !spawnhere it gives me this errors:

error 017: undefined symbol "nset"
error 017: undefined symbol "text"

I dont know if i have to make a new nset[128]; and new text[128]; :V

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #6 on: August 12, 2014, 05:06:09 pm »
Thanks :D, but now when i put the cmd !spawnhere it gives me this errors:

error 017: undefined symbol "nset"
error 017: undefined symbol "text"

I dont know if i have to make a new nset[128]; and new text[128]; :V
replace:
nset with nedbset
nget with nedbget
and replace text with cmdtext if you are using a prebuilt script.

That code won't work anymore if you want me to make a new code tell me.
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline The_Lucifer

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #7 on: August 13, 2014, 05:02:42 am »
I realy dont know what do you mean with that the code wont work, but all the errors are fixed, but when a use !spawnhere then /kill, when i spawn it does not send me to the spawn location, can you please fix this? i already put your name on the credit section of my server :D

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #8 on: August 13, 2014, 03:57:04 pm »
I realy dont know what do you mean with that the code wont work, but all the errors are fixed, but when a use !spawnhere then /kill, when i spawn it does not send me to the spawn location, can you please fix this? i already put your name on the credit section of my server :D
Use this code
Code: [Select]
public OnPlayerText(playerid, text[])
{
if(strcmp(text,"!spawnhere", true)==0)
{
new Float:px, Float:py, Float:pz,s[128];
GetPlayerPos(playerid,px,py,pz);
format(s,128,"%f", px);
nedbset("players", gPlayers[playerid], "asx", s);
format(s,128,"%f", py);
nedbset("players", gPlayers[playerid], "asy", s);
format(s,128,"%f", pz);
nedbset("players", gPlayers[playerid], "asz", s);s
SendClientMessage(playerid, COLOR_GREEN, "*NE.CrystalBlues function*You will now spawned right here.");
}
}
public OnPlayerSpawn(playerid,classid,teamid)
{
SetPlayerPos(playerid, floatstr(nedbget("players", gPlayers[playerid], "asx")),floatstr(nedbget("players", gPlayers[playerid], "asy")),floatstr(nedbget("players", gPlayers[playerid], "asz")));
}
This is updated so it will worrk now.
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline The_Lucifer

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #9 on: August 14, 2014, 07:59:13 am »
Okay, now im getting this errors:

(2692) : error 035: argument type mismatch (argument 4)
(2694) : error 035: argument type mismatch (argument 4)
(2696) : error 035: argument type mismatch (argument 4)

I tried to search that error on google but nothing came up :V
Those errors are on the !spawnhere cmd, here are the lines:

Code: [Select]
[2686] }
[2687] else if(strcmp(text,"!spawnhere", true)==0)
[2688] {
[2689] new Float:px, Float:py, Float:pz,s[128];
[2690] GetPlayerPos(playerid,px,py,pz);
[2691] format(s,128,"%f", px);
[2692] nedbset("players", gPlayers[playerid], "asx", s);
[2693] format(s,128,"%f", py);
[2694] nedbset("players", gPlayers[playerid], "asy", s);
[2695] format(s,128,"%f", pz);
[2696] nedbset("players", gPlayers[playerid], "asz", s);
[2697] SendClientMessage(playerid, COLOR_GREEN, "*NE.CrystalBlues function*You will now spawned right here.");
[2698] }

Sorry

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #10 on: August 14, 2014, 12:30:53 pm »
Okay, now im getting this errors:

(2692) : error 035: argument type mismatch (argument 4)
(2694) : error 035: argument type mismatch (argument 4)
(2696) : error 035: argument type mismatch (argument 4)

I tried to search that error on google but nothing came up :V
Those errors are on the !spawnhere cmd, here are the lines:

Code: [Select]
[2686] }
[2687] else if(strcmp(text,"!spawnhere", true)==0)
[2688] {
[2689] new Float:px, Float:py, Float:pz,s[128];
[2690] GetPlayerPos(playerid,px,py,pz);
[2691] format(s,128,"%f", px);
[2692] nedbset("players", gPlayers[playerid], "asx", s);
[2693] format(s,128,"%f", py);
[2694] nedbset("players", gPlayers[playerid], "asy", s);
[2695] format(s,128,"%f", pz);
[2696] nedbset("players", gPlayers[playerid], "asz", s);
[2697] SendClientMessage(playerid, COLOR_GREEN, "*NE.CrystalBlues function*You will now spawned right here.");
[2698] }

Sorry
Sorry it was a bug with the include file.
Download from here
http://www.solidfiles.com/d/ca77b88a6d/nedb.inc
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline [NYB]fast:p

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #11 on: August 23, 2014, 02:42:25 pm »
oh man link not not working!!!   >:(

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: [INCLUDE UNTESTED] NE Database system
« Reply #12 on: August 23, 2014, 05:37:15 pm »
I am NE.CrystalBlue!!!
Quote
i cant able to understand