Set model Scale

This error is driving me nuts. My swep errors in the console in 3rd person. It gives me this error

[ERROR] lua/weapons/weapon_zambie/shared.lua:144: bad argument #2 to ‘SetModelScale’ (number expected, got no value)

  1. SetModelScale - [C]:-1
  2. unknown - lua/weapons/weapon_zambie/shared.lua:144

so i go to line 144, and what do i see?

NOTHING. there is absolutley Nothing there. its an empty line. what is wrong???

-bump- :frowning:

What about removing the line, you might also wan’t to know if theres any errors else.

[editline]5th March 2013[/editline]

What about removing the line, you might also wan’t to know if theres any errors else.

And paste hole the code in the chat please…

do: (WITHOUT DOD (.))

[cod.e]

your code here

[/cod.e]

Btw remember to past your code.
I think you forgot the 2th argument “time spend”

Gmod12
SetModelScale(V)

Gmod13
SetModelScale(V,N)

If you want to set the model’s scale instant … do: SetModelScale(V,0).
If you want it to make a shrink/grow “animation” change N to x seconds it should take.

[Tip] Run it server-side. Client-side wont work correctly.

But the fact is that my script HAS no SetModelScale. its sending me to that error but the script doesn’t exist…

It’s not a phantom error. The error is there because you didn’t pass a second argument to the function. Post your code.

This is my code. posting the error

The problem is that you are using that type of comments:
[lua]/---------------------------------------------------------
SecondaryAttack
---------------------------------------------------------
/[/lua]

They mess up line count in debug, so you won’t get the correct line.
Or it was some other type of comments, I’m not exactly sure, but blocked comments sometimes mess up line count.
Try removing the comments and seeing what line it turns out to be.

tl;dr some comments may mess up line count

That doesn’t affect anything…