Liberty Unleashed

Scripting => Script Help => Topic started by: [RU]Kewun on September 20, 2014, 07:19:41 am

Title: i have a problem
Post by: [RU]Kewun on September 20, 2014, 07:19:41 am
function onPlayerSpawn( pPlayer )
{
                     SetWeapon( 4, 25000  );
}
not working,why?
Title: Re: i have a problem
Post by: rwwpl on September 20, 2014, 08:33:36 am
You forgot a pPlayer ;)

Code: [Select]
function onPlayerSpawn( pPlayer )
{
pPlayer.SetWeapon( 4, 25000 );
}
Title: Re: i have a problem
Post by: [RU]Kewun on September 20, 2014, 08:46:48 am
AN ERROR HAS OCCURED [wrong number of paramets]

CALLSTACK


LOCALS
i have this problem in server.exe when player spawns.. idk why
but your fix still doesnt work..
Title: Re: i have a problem
Post by: rwwpl on September 20, 2014, 08:53:58 am
Code: [Select]
function onPlayerSpawn( pPlayer )
to

Code: [Select]
function onPlayerSpawn( pPlayer, spawn )
Title: Re: i have a problem
Post by: [RU]Kewun on September 20, 2014, 08:56:01 am
doesnt work still... :(
Title: Re: i have a problem
Post by: rwwpl on September 20, 2014, 09:04:45 am
From my server.

Code: [Select]
function onPlayerSpawn(p,s)
{
p.SetWeapon(4,750);
return 1;
}
Title: Re: i have a problem
Post by: [RU]Kewun on September 20, 2014, 09:15:07 am
nah,doesnt work
Title: Re: i have a problem
Post by: Thijn on September 20, 2014, 11:39:45 am
nah,doesnt work
It does. Are you getting errors? If so, please post a screenshot of the console and your script with the appropriate lines.
Title: Re: i have a problem
Post by: xMerkel on September 21, 2014, 08:18:50 pm
You have double the func in your code.
Title: Re: i have a problem
Post by: [RU]Kewun on September 25, 2014, 04:48:27 pm
as i said the error is
AN ERROR HAS OCCURED [wrong number of paramets]

CALLSTACK


LOCALS

and i dont know how double func
Title: Re: i have a problem
Post by: xMerkel on September 25, 2014, 05:49:35 pm
Code: [Select]
function onPlayerSpawn ( pPlayer, Skin ) {

pPlayer.SetWeapon ( 4, 999 );
}

Remove others things with same function.
Title: Re: i have a problem
Post by: Pipec on September 25, 2014, 07:09:10 pm
In 0.1.0.12 onPlayerSpawn  function had a very rare error:

When you try to teleport a player, you get error instead. Solution was to put inside of onPlayerSpawn   timer with 100-250 delay.

Timer should work always. And if you want to avoid segfault with timers, use playerid instead of player handle.
Title: Re: i have a problem
Post by: [RU]Kewun on September 29, 2014, 06:23:23 pm
im noob in scripting but
can you post the whole script? i cant add a timer... im noob in SQL ;\

Title: Re: i have a problem
Post by: [RU]Kewun on October 02, 2014, 02:34:16 pm
where i can learn squrriel language?
Title: Re: i have a problem
Post by: [RU]Kewun on January 13, 2015, 04:37:20 pm
ah nvm it works now,thx