Garry's Mod

can help me with a Error

Submitted by gatgat_tv, , Thread ID: 100638

Thread Closed
01-09-2018, 10:41 PM
#1
Hello i am using a SantosRP Gamemode and i have a shity error on my Logs :(

[ERROR] gamemodes/santosrp/gamemode/sv_player.lua:88: attempt to perform arithmetic on local 'newWalk' (a nil value)

1. UpdatePlayerMoveSpeed - gamemodes/santosrp/gamemode/sv_player.lua:88
2. ModifyMoveSpeed - gamemodes/santosrp/gamemode/sv_player.lua:104
3. UpdatePlayerStamina - gamemodes/santosrp/gamemode/sv_needs.lua:94
4. PlayerSpawn - gamemodes/santosrp/gamemode/sv_needs.lua:228
5. unknown - gamemodes/santosrp/gamemode/init.lua:175



can help me fixing the error on my server.

RE: can help me with a Error

#2
Can you upload the file of gamemodes/santosrp/gamemode/sv_player.lua or it's code?

RE: can help me with a Error

OP
#3
yes i have here look

https://pastebin.com/i4L49ZaP

hope you can help me

RE: can help me with a Error

This post was last modified: 02-09-2018, 12:18 AM by HealthAngel
#4
Try add those semicolons (Wink maybe program code reads as one line [Turn at 88 th line]:
Code:
if pPlayer.m_tblSpeedFlags then
    for k, v in pairs( pPlayer.m_tblSpeedFlags ) do
      newWalk = newWalk +v[1];
      newRun = newRun +v[2];
    end;
  end;
Also sometimes on loop's helps value resets [on 84 th line]

Code:
local newWalk = 0, newRun = GAMEMODE.Config.DefWalkSpeed, GAMEMODE.Config.DefRunSpeed

It is my predictions, better to test it.

RE: can help me with a Error

OP
#5
02-09-2018, 12:15 AM
GarryLT Wrote:
Try add those semicolons (Wink maybe program code reads as one line [Turn at 88 th line]:
Code:
if pPlayer.m_tblSpeedFlags then
    for k, v in pairs( pPlayer.m_tblSpeedFlags ) do
      newWalk = newWalk +v[1];
      newRun = newRun +v[2];
    end;
  end;
Also sometimes on loop's helps value resets [on 84 th line]

Code:
local newWalk = 0, newRun = GAMEMODE.Config.DefWalkSpeed, GAMEMODE.Config.DefRunSpeed

It is my predictions, better to test it.
hmm not working :(

RE: can help me with a Error

#6
Ah sorry mate, i couldn't help it is beyond my knowledge. Actually the code is good maybe it is problem in Config file at Defwalkspeed

RE: can help me with a Error

OP
#7
ahh okey I'll keep trying thanks for your help


or do you have discord Smile

Users browsing this thread: 5 Guest(s)