Picture troubles @_@ [SOLVED]

Anonynn
20 Jul 2016, 00:13http://textadventures.co.uk/forum/samples/topic/5566/how-to-control-how-images-are-displayed
I have this link saved in case I want to mess with pictures or anything. So I tried to implement a new one that I drew using this...
("<img src="" + GetFileURL("https://s31.postimg.org/kpb4dqfor/Goblin_NPC_Hannah_Picksnap.jpg") + "" style="display: block; margin-left: auto; margin-right: auto;" />")
Which came from this...
msg ("<img src="" + GetFileURL("gravestone.png") + "" style="display: block; margin-left: auto; margin-right: auto;" />")
msg ("You are in a room. A large room, entirely white, nothing here but a gravestone.")
msg ("Your gravestone.")
But when I tried to look at the picture in the game. It said...
Error running script: Missing ')'
^--- I'm not exactly sure where to put that. Can anyone help :) ?
hegemonkhan
20 Jul 2016, 02:34I think it has something to do with the double quotes***, not the ')', but this is a bit too confusing for me to figure out the what's the correct syntax is... sighs. Pixie. Jay, Pertex, or whoever else will probably be needed to figure it out... (I had enough trouble with just understanding the correct syntax is the 'lvl' lvlup Library... but this uses a bit different structure than it, so I'm not sure how to fix it up for you)
.*** the 2 types of chunks being used together:
" TEXT "
along with
.+ VARIABLE +
try removing the semicolon after the last 'auto'.
if that doesn't work, then try this... err, I can't get it to post as I still am having trouble with this forum's 'markdown' laguage, arg
you may need to remove some of the double quotes and/or you may need to put the escape character ('') on the left side of some of the double quotes, like this: .", but without the dot/period in front of it.
using Pixie's guide's link in your post, look at this:
msg ("<img src=\"" + GetFileURL("gravestone.png") + "\" />")
so, try this (maybe this might work... I hope):
msg ("<img src=\"" + GetFileURL + "(\"https://s31.postimg.org/kpb4dqfor/Goblin_NPC_Hannah_Picksnap.jpg\")\" style=\"display: block; margin-left: auto; margin-right: auto\" />")
great pic, btw!, hehe:D

Anonynn
20 Jul 2016, 03:00---great pic, btw!, hehe:D---
Thanks!! :D I appreciate it.
After trying...
("<img src="" + GetFileURL("https://s31.postimg.org/kpb4dqfor/Goblin_NPC_Hannah_Picksnap.jpg") + "" style="display: block; margin-left: auto; margin-right: auto" />")
I'm still getting this error...
Error running script: Missing ')'
I appreciate the help so far, btw! I'm not very savvy when it comes to HTML or whatever that language is for linking pictures xD
I wish there was a way to manipulate it in the same way without using an outside URL.
hegemonkhan
20 Jul 2016, 03:05try this...
msg ("<img src=\"" + GetFileURL + "(\"https://s31.postimg.org/kpb4dqfor/Goblin_NPC_Hannah_Picksnap.jpg\")\" style=\"display: block; margin-left: auto; margin-right: auto\" />")
or try it with the semicolon back on the last auto:
msg ("<img src=\"" + GetFileURL + "(\"https://s31.postimg.org/kpb4dqfor/Goblin_NPC_Hannah_Picksnap.jpg\")\" style=\"display: block; margin-left: auto; margin-right: auto;\" />")

Anonynn
20 Jul 2016, 03:27Is there a way to make it do the block; margin left: auto; margin-right: auto; based on this...
Trying your new suggestion :)
Nah, the extra slashes turn it into an expression in both cases:
Error running script: Error compiling expression '"("<img src=\"" + GetFileURL + "(\"https://s5.postimg.org/aaicoyvur/NPC_Goblin_Hannah_P_Color05_min_2.jpg\")\" style=\"display: block; margin-left: auto; margin-right: auto;\" />")"': SyntaxError: Unexpected character: \Line: 1, Column: 17
Pertex
20 Jul 2016, 06:03You only need GetFileURL when you want to display a image from the quest directory. If you want to show am image from the internet you can call it directly:
msg ("<img src=\"https://s31.postimg.org/kpb4dqfor/Goblin_NPC_Hannah_Picksnap.jpg" style=\"display: block; margin-left: auto; margin-right: auto;\" />")

Anonynn
20 Jul 2016, 13:15Thanks Pertex :D ...is there a way to do what I'm doing without linking a picture to the internet?
Pertex
20 Jul 2016, 13:57What are you doing or what do you want to do? :-)

Anonynn
20 Jul 2016, 14:25Well, I want to add a picture to the game without making it online if possible (in case someone plays it without internet). For example...
<center.>{img:Apoca-Title Sequence 3.gif}</.center> ((I know the periods aren't supposed to be there))
But I was wondering if it's possible to do...
display: block; margin-left: auto; margin-right: auto
to a picture I add to the game without it being a URL.
So it'll appear like...
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- P
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- I
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- C
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- T
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- U
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- R
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext ---------- E
An example is, to display text beside a picture which is displayed when a character looks at an NPC. Does that make sense?

Alex Warren
20 Jul 2016, 14:55Indent code with 4 spaces or surround it with three backticks, as per the formatting help next to where you post. You'll have a much easier time posting code samples.

Anonynn
20 Jul 2016, 19:11Any ideas :D? ((also thank you Alex, I'm getting better with it now)) ^_^

Anonynn
21 Jul 2016, 04:18Pertex or anyone :3
Pertex
21 Jul 2016, 06:59you can't do it with the textprocessor but if you follow the instructions of The Pixie's tutorial you can do:
msg("<img src=\"" + GetFileURL("Goblin_NPC_Hannah_Picksnap.jpg") + "\" style=\"float:right; padding:15px;\" />")
msg("This is your text")
msg("Hello")
The Pixie
21 Jul 2016, 07:03If I understand you right, you want the image in your game file, in the .quest file that gets uploaded.
Download the image and save it in the same folder as your game. Then this should work (note that I added 4 backslashes):
msg("<img src=\"" + GetFileURL("Goblin_NPC_Hannah_Picksnap.jpg") + "\" style=\"display: block; margin-left: auto; margin-right: auto;\" />")
If that works, you can change the style attribute to get it in the right place (in fact Pertex has done that as I write this).

Anonynn
21 Jul 2016, 18:20I appreciate it everyone! :D It's working great now. Thank you, thank you! :3
I was also forgetting to make it an "expression" too.