Author Topic: i have a problem  (Read 3556 times)

[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
i have a problem
« on: September 20, 2014, 08:19:41 am »
function onPlayerSpawn( pPlayer )
{
                     SetWeapon( 4, 25000  );
}
not working,why?
Fear the wrath of god!


rwwpl

  • Full Member
  • ***
  • Posts: 126
  • Karma: +18/-6
  • LU-DM Team
    • View Profile
    • LU-DM Team
Re: i have a problem
« Reply #1 on: September 20, 2014, 09:33:36 am »
You forgot a pPlayer ;)

Code: [Select]
function onPlayerSpawn( pPlayer )
{
pPlayer.SetWeapon( 4, 25000 );
}

[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #2 on: September 20, 2014, 09: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..
« Last Edit: September 20, 2014, 09:50:03 am by SmallRhino »
Fear the wrath of god!


rwwpl

  • Full Member
  • ***
  • Posts: 126
  • Karma: +18/-6
  • LU-DM Team
    • View Profile
    • LU-DM Team
Re: i have a problem
« Reply #3 on: September 20, 2014, 09:53:58 am »
Code: [Select]
function onPlayerSpawn( pPlayer )
to

Code: [Select]
function onPlayerSpawn( pPlayer, spawn )

[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #4 on: September 20, 2014, 09:56:01 am »
doesnt work still... :(
Fear the wrath of god!


rwwpl

  • Full Member
  • ***
  • Posts: 126
  • Karma: +18/-6
  • LU-DM Team
    • View Profile
    • LU-DM Team
Re: i have a problem
« Reply #5 on: September 20, 2014, 10:04:45 am »
From my server.

Code: [Select]
function onPlayerSpawn(p,s)
{
p.SetWeapon(4,750);
return 1;
}

[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #6 on: September 20, 2014, 10:15:07 am »
nah,doesnt work
Fear the wrath of god!


Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: i have a problem
« Reply #7 on: September 20, 2014, 12:39:45 pm »
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.

xMerkel

  • Newbie
  • *
  • Posts: 34
  • Karma: +1/-12
  • Cpp
    • View Profile
Re: i have a problem
« Reply #8 on: September 21, 2014, 09:18:50 pm »
You have double the func in your code.

[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #9 on: September 25, 2014, 05: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
Fear the wrath of god!


xMerkel

  • Newbie
  • *
  • Posts: 34
  • Karma: +1/-12
  • Cpp
    • View Profile
Re: i have a problem
« Reply #10 on: September 25, 2014, 06:49:35 pm »
Code: [Select]
function onPlayerSpawn ( pPlayer, Skin ) {

pPlayer.SetWeapon ( 4, 999 );
}

Remove others things with same function.

Pipec

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Re: i have a problem
« Reply #11 on: September 25, 2014, 08: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.

[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #12 on: September 29, 2014, 07:23:23 pm »
im noob in scripting but
can you post the whole script? i cant add a timer... im noob in SQL ;\

Fear the wrath of god!


[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #13 on: October 02, 2014, 03:34:16 pm »
where i can learn squrriel language?
Fear the wrath of god!


[RU]Kewun

  • Full Member
  • ***
  • Posts: 124
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: i have a problem
« Reply #14 on: January 13, 2015, 05:37:20 pm »
ah nvm it works now,thx
Fear the wrath of god!


 

© Liberty Unleashed Team.