English cs2d tmw error

3 replies
Goto Page
To the start Previous 1 Next To the start
24.11.15 05:23:50 pm
Up
Fuly
User
Offline Off
LUA ERROR: sys/lua/autorun/TooManyWeapons.lua:388: bad argument #1 to 'print' (string
expected, got nil)
-> [C]: in function 'print'
-> sys/lua/autorun/TooManyWeapons.lua:388: in function <sys/lua/autorun
TooManyWeapons.lua:383>
-> in Lua hook 'say', params: 1, 'tmw'

Spoiler >
24.11.15 05:48:33 pm
Up
Fraizeraust
Moderator
Offline Off
Try with this and tell me if it works or no. If the issue still persist, post it here.
Code:
1
print("targetID", text:find(" ?(%d+)", 5))
24.11.15 05:55:09 pm
Up
VADemon
User
Offline Off
Oh well, I don't know how this line made it's way uncommented into release.
• Since it's a print function, it doesn't do anything, just remove that line.

Since I use file cs2d [DEV] Improved print() 1.1 (8) I don't have this problem when testing code. Long story short: default print() function is crap and doesn't support multiple values string.find() returns
24.11.15 06:22:00 pm
Up
Fuly
User
Offline Off
@user Fraizeraust: thx
To the start Previous 1 Next To the start