Author Topic: Can't find the error  (Read 3599 times)

_YaZeEn_

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Can't find the error
« on: December 17, 2011, 12:39:23 pm »
I am making a server from 0.
Hashes functions are different from VC-MP hashes functions so i failed

http://pastebin.com/gyJQQ3hX

Can anyone tell me where is the error/ fix it for me  :)


VetalYA

  • Guest
Re: Can't find the error
« Reply #1 on: December 17, 2011, 05:03:37 pm »
Tell us more about error.

For example, In which line & col error is.

Mattz

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
  • BK-201
    • View Profile
Re: Can't find the error
« Reply #2 on: December 18, 2011, 12:14:01 am »
Did you get an error output in the server console? If you did, what does it say


VetalYA

  • Guest
Re: Can't find the error
« Reply #3 on: December 18, 2011, 12:19:04 am »
Did you get an error output in the server console? If you did, what does it say
This is exactly what I meant  by previous post  :P :P :P :P :P :P

VetalYA

  • Guest
Re: Can't find the error
« Reply #4 on: December 18, 2011, 02:30:16 am »
I just have a looked.. Very strange code, & there's a lot of "invisible" errors....

@ _YaZeEn_

Are you sure, that this will work for LU ? i dont think so  ::) 8)
« Last Edit: December 18, 2011, 12:15:47 pm by VetalYA »

_YaZeEn_

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: Can't find the error
« Reply #5 on: December 18, 2011, 04:51:17 am »
Are you sure, that this will work for LU ? i dont think so  ::) 8)

I have been scripting for vc-mp and suddenly switched to LU so i got confused.

Did you get an error output in the server console? If you did, what does it say

No errors on console but when i go ingame and test the scripts nothing works.. :(

Can i get a Login/Register system (Hashes) anywhere? Not the DB one.


stormeus

  • No-Lifer
  • Developer
  • Full Member
  • *****
  • Posts: 112
  • Karma: +13/-2
    • View Profile
Re: Can't find the error
« Reply #6 on: December 18, 2011, 05:01:42 am »
Code: (Squirrel) [Select]
function RegisterUser(player,password)
{

Logged.Load(player.Name + "Logged","True");
Password.Load(player.Name + "Password", password);
Cash.Add(player.Name + "Cash", "0");
IP.Add( player.Name + "IP", player.IP );
Level.Add( player.Name + "Level" "1");
}
Code: (Squirrel) [Select]
Logged.Load(player.Name + "Logged","True");
Password.Load(player.Name + "Password", password);

I believe you meant HashTable.Add



Code: (Squirrel) [Select]
IP <- HashTable("Ip's"); Make it Ips instead of Ip's to be safe.



Code: (Squirrel) [Select]
LoadModule( "lu_sqlite" ); // Load up the sqlite moduleNot even using SQLite, why load the module for it?



Code: (Squirrel) [Select]
Level.Add( player.Name + "Level" "1");
Code: (Squirrel) [Select]
Logged.Add(player.Name + "Logged" "True" );
Missing a comma, should be:

Code: (Squirrel) [Select]
Level.Add( player.Name + "Level", "1");
Code: (Squirrel) [Select]
Logged.Add(player.Name + "Logged", "True" );


Code: (Squirrel) [Select]
local IP = player.IP, Login = Logged.Get( player.Name + "Logged" );
 local OIP = IP.Get( player.Name + "IP" ), lvl = Level.Get(player.Name + "Level");

You defined IP at a local level:
Code: (Squirrel) [Select]
local IP = player.IP
Therefore,
Code: (Squirrel) [Select]
IP.Get( player.Name + "IP" )
Will fail.



Triple check your code thoroughly. I've helped this time, but I likely won't help with any careless syntax errors after this.
« Last Edit: December 18, 2011, 05:08:46 am by stormeus »
Quote
Morphine says:
    them LU devs ranting about how LU doesn't have client pickups
    while us VC:MPers don't have client anything
    ;_;

Stormeus Argo says:
    we have client crashes though
    ohohohohoho

Morphine says:
    LU DOESN'T HAVE THAT

Stormeus Argo says:
    LU - 0
    VC:MP - 1

_YaZeEn_

  • Newbie
  • *
  • Posts: 13
  • Karma: +1/-0
    • View Profile
Re: Can't find the error
« Reply #7 on: December 18, 2011, 05:54:29 am »
Code: (Squirrel) [Select]
function RegisterUser(player,password)
{

Logged.Load(player.Name + "Logged","True");
Password.Load(player.Name + "Password", password);
Cash.Add(player.Name + "Cash", "0");
IP.Add( player.Name + "IP", player.IP );
Level.Add( player.Name + "Level" "1");
}
Code: (Squirrel) [Select]
Logged.Load(player.Name + "Logged","True");
Password.Load(player.Name + "Password", password);

I believe you meant HashTable.Add



Code: (Squirrel) [Select]
IP <- HashTable("Ip's"); Make it Ips instead of Ip's to be safe.



Code: (Squirrel) [Select]
LoadModule( "lu_sqlite" ); // Load up the sqlite moduleNot even using SQLite, why load the module for it?



Code: (Squirrel) [Select]
Level.Add( player.Name + "Level" "1");
Code: (Squirrel) [Select]
Logged.Add(player.Name + "Logged" "True" );
Missing a comma, should be:

Code: (Squirrel) [Select]
Level.Add( player.Name + "Level", "1");
Code: (Squirrel) [Select]
Logged.Add(player.Name + "Logged", "True" );


Code: (Squirrel) [Select]
local IP = player.IP, Login = Logged.Get( player.Name + "Logged" );
 local OIP = IP.Get( player.Name + "IP" ), lvl = Level.Get(player.Name + "Level");

You defined IP at a local level:
Code: (Squirrel) [Select]
local IP = player.IP
Therefore,
Code: (Squirrel) [Select]
IP.Get( player.Name + "IP" )
Will fail.



Triple check your code thoroughly. I've helped this time, but I likely won't help with any careless syntax errors after this.

Oh , Thanks :)

 

© Liberty Unleashed Team.