Blockland Forums > Modification Help
Debugging error much?
<< < (2/2)
Chrono:

--- Quote from: Scout31 on February 11, 2012, 10:56:46 AM ---NewChatHUD_addLine only works on client, serverCmd only works on the server.

--- End quote ---
Basically whenever anyone uses this command, it'll message the host.
Ipquarx:

--- Quote from: Chrono on February 11, 2012, 02:02:38 PM ---Basically whenever anyone uses this command, it'll message the host.
--- End quote ---
Or if its being used on a dedicated server, it'l cause a crash. RULES FTW

Anyway, use messageClient, here is how it's used:
messageClient(%Client, '', %Message);
jes00:

--- Quote from: Slicksilver on February 10, 2012, 10:22:23 PM ---@ is the string connector in torque. Insert it between strings (the thingies with quotes around them) and other strings or variables.


function ServerCmdBLID(%target)
{
NewChatHUD_AddLine("\c2" @ %target @ "BL_ID is: \c6" @ %target.bl_id @ "");
}

Aside from that, you need to use %target.getPlayerName() or %target.name not %target. You also need to add %target = findClientByName(%target); at the top of the function.

--- End quote ---
The @ and the "" are not required at the end.
Slicksilver:

--- Quote from: jes00 on February 11, 2012, 05:16:45 PM ---The @ and the "" are not required at the end.

--- End quote ---
I only added @, their code had the "" at the end.
Chrono:

--- Quote from: Ipquarx on February 11, 2012, 04:49:00 PM ---Or if its being used on a dedicated server, it'l cause a crash.

--- End quote ---
No, creating GUIs causes crashes.

Trying to call functions on non-existant objects doesn't.
Navigation
Message Index
Previous page

Go to full version