Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


  Show Posts
Pages: 1 [2] 3 4 ... 9
16  Scripting / Script Help / Re: Error.. error.. error.. on: July 03, 2012, 07:48:00 pm
print( typeof( player.Pos ) ); = string

In that case, try print( player.Pos ), because that just doesn't look right.
17  Scripting / Script Help / Re: Error.. error.. error.. on: July 03, 2012, 07:35:51 pm
Same thing for ^^^ code.

Code: [Select]
print( typeof( player ) );
print( typeof( player.Pos ) );
18  Scripting / Script Help / Re: Error.. error.. error.. on: July 03, 2012, 06:59:29 pm
@ Thijn: Hey mr obvious, it is not. It's the SINGLE query that is supposed to return a float, and there is not a point to put it in a class, because ( obvious ) I use it just once.

passwords, admin level, LCPD Sub-divisions level & other things are obviously stored in a class.

It's still pretty bad when you can just put it all in one query like so:
Code: [Select]
local q = sqlite_query( database, "SELECT X, Y, Z, Skin, Wep, Ammo FROM LASTLOGIN WHERE Name='" + player.Name.toupper() + "' LIMIT 1" );

// x - Column 0
// y - Column 1
// z - Column 2
// etc.

Performing so many queries that could be done in one query could be detrimental to performance down the road. Not only that, but I'll never understand what the hell this is:

Code: [Select]
player.Pos = Vector( sqlite_column_data(sqlite_query(database, "SELECT X FROM LASTLOGIN WHERE Name='"+player.Name.toupper()+"' " ),0), sqlite_column_data(sqlite_query(database, "SELECT Y FROM LASTLOGIN WHERE Name='"+player.Name.toupper()+"' " ),0), sqlite_column_data(sqlite_query(database, "SELECT Z FROM LASTLOGIN WHERE Name='"+player.Name.toupper()+"' " ),0) );

When you could've simply done:
Code: [Select]
local q = sqlite_query( database, "SELECT X, Y, Z FROM LASTLOGIN WHERE Name = '" + player.Name.toupper() + "' LIMIT 1" );

local x = sqlite_column_data( q, 0 ).tofloat();
local y = sqlite_column_data( q, 1 ).tofloat();
local z = sqlite_column_data( q, 2 ).tofloat();

Anyways, if you're still having problems, simply try this code:
Code: [Select]
player.Pos = Vector( 0.0, 0.0, 0.0 );

And see if it still complains about it not being a vector. If that one line works, then I'm going to guess that your problem is that you're performing too many goddamn operations on a single Vector constructor. In that case, try the code further above that deals with the database.
19  Liberty Unleashed / LU Clans / Re: [HC] Hacker Clan on: June 08, 2012, 09:35:37 pm
lol'd so hard. I'll make sure to have you guys clan-banned on Argonath LU.
20  Off Topic / Spam / Re: a question For the intelligent Only ;D on: June 07, 2012, 11:35:26 pm
What is the thing that holds more than 1000 tons and can't carry a nail   ??? !!!!

I have no idea.


Quote
What is the member which is in the human body, that closes when the human sneeze  ??? !!!!!

Too easy, eyes.
21  Liberty Unleashed / Suggestions / Re: my suggestion on: May 16, 2012, 12:49:34 pm
* stormeus , making fun of SugarD, says:

This isn't MTA, boy!
22  Off Topic / Spam / Re: WATHA FUCK !?!/1/ on: April 28, 2012, 04:44:29 pm
Only in Asia. ::)
23  Scripting / Scripting Discussion / Re: Help. on: April 20, 2012, 09:04:50 pm
There are ai possible for me source of the server.exe

Unless you become a Dev, this is not happening. Ever.
24  Scripting / Scripting Discussion / Re: Player/Vehicle Classes on: April 06, 2012, 03:03:14 pm
Unlike a normal Squirrel class, the Player and Vehicle classes are not traditionally extensible (class herp extends derp) due to the way they are implemented. However, upon loading the scripts, you CAN create new slot instances in either class, and they will be accessible through any instance.

Code: (Squirrel) [Select]
function onPlayerJoin( pPlayerInst )
{
Player.Herp <- function() // Inserts into base class
{
::print( "LOLOLO" );
}

pPlayerInst.Herp(); // Player instance changed dynamically, function works
}

EDIT: Should probably add that you should be extending the classes in onScriptLoad (or onServerStart). Doing Player.NewSlot <- in onPlayerJoin isn't healthy.

EDIT 2: This is more kosher.
Code: (Squirrel) [Select]
function hook_Herp()             { ::print( "LOLOLO" );      }
function onScriptLoad()          { Player.Herp <- hook_Herp; }
function onPlayerJoin( pPlayer ) { pPlayer.Herp();           }
25  Liberty Unleashed / Suggestions / Set Client-Side Weather on: March 28, 2012, 01:37:28 am
Title says it all, it'd be cool if there were a SetWeather/GetWeather function in client-side scripts.
26  Off Topic / Spam / SPAAAAAAAAAAAAACE on: March 26, 2012, 12:54:34 am
Spaaaaace


Spell it with me... S-P-AAAAAAAAAAAAAAAAAAAAAAAACE
27  Liberty Unleashed / Liberty Unleashed Chat / Re: VRockah! on: March 20, 2012, 08:00:20 pm
Lol damn, I had a dream that my LU Browser downloaded an update too!

And I had a dream that VC-O was released, and stable. ::)
28  Off Topic / Spam / Re: Full Browser! on: March 14, 2012, 11:17:18 am
Since this time, a lot of players been on this server, including Svenko,  which Wide known on planet Earth and beyond our Solar System as great admin of lolmortuary server.

When the LU team finishes Grand Central Racing in five years, you'll eat those words. ::)
* stormeus runs
29  Liberty Unleashed / Support / Re: LU hangs my GTA3/machine on: March 10, 2012, 05:51:06 pm
I've had this happen before, mainly because of some issues reading the disc. When I reopened it, it worked fine.
30  Off Topic / Spam / Re: Help me on: March 02, 2012, 01:33:16 am
Hello. Can you help me? I don't know how to translate it on english, so you should use translater:
???? ?? ????????? ???, ?? ????? :D
 ;D

Okay, here's your answer.
:D :D ??? ??? ??? ?????? :) ;) ;) ;) ::) ::) ::) ::) ::) :-\ :D :D :D :D :D :D :D :D :o :o :o 8)
Pages: 1 [2] 3 4 ... 9
© Liberty Unleashed Team.