English cs2d !l lua error

7 replies
Goto Page
To the start Previous 1 Next To the start
16.12.15 04:39:44 pm
Up
Fuly
User
Offline Off
help??


-> [C]: in function 'parse'
-> sys/lua/roleplay.lua:4016: in function <sys/lua/roleplay.lua:3906>

Spoiler >
16.12.15 05:17:49 pm
Up
GeoB99
Moderator
Offline Off
Not sure in which part of "parse" function has this issue since either you or the Console didn't explain the exact origin of this error. Try to invert wpn and id near 35 line but I highly doubt that would work.
Code:
1
function projectile_hook(wpn, id, x, y)
16.12.15 05:21:19 pm
Up
omg
User
Offline Off
lol this says nothing about what line it is
will code for food
16.12.15 05:22:41 pm
Up
Yates
Reviewer
Offline Off
>error line 4016
>post only contains 271 lines

Classic mistake. Update your error responding to the lines in your post, or post the line where the error occurs.

It's up to you.
16.12.15 09:36:10 pm
Up
Fuly
User
Offline Off
Code:
1
parse([[lua "]]..lua..[["]])


me?

@user GeoB99: work error
16.12.15 11:05:17 pm
Up
Lee
Moderator
Offline Off
Looks like you have to handle the error generated by parse with lua code. Why not just wrap it within a pcall?

Code:
1
2
3
4
5
if pcall(parse, ('lua "%s"'):format(lua)) then
  msg2(id, "Success")
else
  msg2(id, "Failed to parse lua command")
end
17.12.15 02:51:44 pm
Up
Fuly
User
Offline Off
-> [C]: ?
-> [C]: in function 'pcall'
-> sys/lua/roleplay.lua:3946: in function <sys/lua/roleplay.lua:3836>

No @user Lee: error

Code:
1
2
3
4
5
if pcall(parse, ('lua "%s"'):format(lua)) then
              msg2(id, "Success")
              else
              msg2(id, "Failed to parse lua command")
             end
17.12.15 03:21:31 pm
Up
Dousea
User
Offline Off
We're missing the important error here. I guess you only posted the traceback.
I'm awesome ... and I really like cookies.
To the start Previous 1 Next To the start