Jump to content

Echo help


jokerofsouls

Recommended Posts

Thanks for reading this

 

I have been having problems with my echo i need it to do something, but it will not work.

 

pUnit:SendChatMessage(11,0,"Test")

 

I can't find out how to get the " on there with the echo without it giving me a error.

This is what i have so far

 

echo "pUnit:SendChatMessage(". $Type . ",0," . $Say .")<br />";

Link to comment
https://forums.phpfreaks.com/topic/125039-echo-help/
Share on other sites

Sorry for confusing you but i want it so one i put it in a

 

<input name="Say" type="text" />

 

That it will print

 

pUnit:SendChatMessage("11,0,"Test")

 

echo "pUnit:SendChatMessage(". $Type . ",0," . $Say . ")<br />";

 

But i can't because i can't put the " anyway in the (". $Type . ",0," . $Say . ") without messing it up.

 

Link to comment
https://forums.phpfreaks.com/topic/125039-echo-help/#findComment-646170
Share on other sites

Ok :( sorry

 

echo "pUnit:SendChatMessage(". $Type . ",0," . $Say . ")<br />";

Ok i want it so one you type something in something like this

 

http://luaxl.blackapplehost.com/aaalua.php

 

It will come out with the test changed one i click submit pUnit:SendChatMessage(11,0,"Test")

But i want the "    " to stay one it prints it out

Link to comment
https://forums.phpfreaks.com/topic/125039-echo-help/#findComment-646183
Share on other sites

OK, I officially have no idea what you're asking. But, I'm trying!

 

1st, where is the value of the variable $Type determined?

2nd, where is the value of the variable $Say determined?

3rd, what in the world is pUnit:SendChatMessage? (is it a function, or just text you wand displayed on the page, or what?)

 

Ultimately, what do you want this code to do?

Link to comment
https://forums.phpfreaks.com/topic/125039-echo-help/#findComment-646186
Share on other sites

<html><body>
<?php
$name = $_POST['name'];
$unit = $_POST['unit'];
$Entry = $_POST['Entry'];
$Say = $_POST['Say'];
$Type = $_POST['Type'];
$Sound = $_POST['Sound'];


echo "Function ". $name . "_onCombat (pUnit, Event)" . $unit ." <br />";
echo "pUnit:PlaySoundToSet(". $Sound . ")<br />";
echo "pUnit:SendChatMessage(". $Type . ",0," . $Say . ")<br />";

?>
</body></html>

 

pUnit:SendChatMessage is for lua im trying to make a luascript maker

 

this is what it would look like one im trying to have the " " in the script

 

"pUnit:SendChatMessage(". $Type . ",0,"" . $Say . "")<br />";

 

But that dont work i need the

 

SendChatMessage(11,0,"Test")

 

the " that are allready in the sendchatmessage.

Link to comment
https://forums.phpfreaks.com/topic/125039-echo-help/#findComment-646188
Share on other sites

looks like this question bares repeating

have you tried

pUnit:SendChatMessage(11,0,"\"Test\"")

 

if you want to echo a double quote.....the put a backslash in front of it

 

 

should look like this in the end

"pUnit:SendChatMessage(\"" . $Type . "\",0,\"" . $Say . "\");"

or you can just use single quotes like I said earlier

'pUnit:SendChatMessage("' . $Type . '",0,"' . $Say . '");'

Link to comment
https://forums.phpfreaks.com/topic/125039-echo-help/#findComment-646190
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.