Author Topic: Need help for lua coding  (Read 3407 times)

0 Members and 1 Guest are viewing this topic.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Need help for lua coding
« on: July 03, 2007, 07:03:19 PM »
Hello, this is my first post here, i hope you will help me :)

I try to add debug messages for the tool Smart welder, that will be shown in console and logged into ulx log files.
Code: [Select]
Msg("this is a smartweld debug test")
MsgAll("this is a smartweld debug test")
ulx.logString("this is a smartweld debug test")

local message = string.format( "%s smart-welded %d props (%d welds)", ply:Nick(), self.props, weldcount)

Msg(message)
MsgAll(message)
ulx.logString(message)

The problem, is that only the first message Msg("this is a smartweld debug test") is printed in the console, all the others just won't work :(.

So i have some questions:

- Is the MsgAll function broken ?
- Is my string.format correct ?
- Can i use ulx functions (in this case, ulx.logString) in others files than ulx files ?

Thanks for help, i'm very beginner with lua (but i'm good at languages like Pawn if you know, so i will understand quick)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Need help for lua coding
« Reply #1 on: July 03, 2007, 11:17:39 PM »
I don't believe MsgAll is a function. So it's stopping (breaking) there.
Experiencing God's grace one day at a time.