Ulysses

General => Developers Corner => Topic started by: Chironex on July 03, 2007, 07:03:19 PM

Title: Need help for lua coding
Post by: Chironex 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)
Title: Re: Need help for lua coding
Post by: Megiddo on July 03, 2007, 11:17:39 PM
I don't believe MsgAll is a function. So it's stopping (breaking) there.