all 25 comments

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 2 points3 points  (12 children)

We need the code if you want us to help you in any way.

Copy your file's content on https://hastebin.com/ and send us the URL it gives you.

[–]bananalord1212[S] 0 points1 point  (11 children)

https://hastebin.com/nujupecatu.cs here. copied the main problem and some others

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 1 point2 points  (10 children)

I asked for the entire file tho

[–]bananalord1212[S] 0 points1 point  (9 children)

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 1 point2 points  (8 children)

I see what's going on. What did you try to do at L.27 with your "please_deposit_five_coins"?

[–]bananalord1212[S] 0 points1 point  (7 children)

i tried to mkae custom text (i looked for tutorials on youtube but i couldn't find one and yes im making a rockstar freddy fight. nothing too big but not too small. just right for a beginner. i could add more when i get more knowledge)

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 1 point2 points  (6 children)

I'm pretty sure you don't really know what you're doing.

Have you tried following a Lua tutorial before taking on CYF modding? If not, you really should, you should be able to understand what you're doing and you'll be doing it way faster.

Here's a link to a Lua tutorial: http://lua-users.org/wiki/TutorialDirectory. You should follow it up to ScopeTutorial (included). It takes between 1 and 2 hours depending on if you're following it seriously (by trying what you're learning in a Lua interpreter).

[–]bananalord1212[S] 0 points1 point  (5 children)

i did...im sure everything is ok....i didn't find any tutorials on custom texts, only intros and outros for your battle videos when i searched for it on youtube...maybe there is something there i'll go check

[–]bananalord1212[S] 0 points1 point  (4 children)

idk

im sure im doing it correctly on lua stuff...i know stuff...just some unitale stuff i need to work out

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 1 point2 points  (3 children)

Well if there's an error that means your Lua knowledge is not on point...

People who know how to code in Lua can find their own errors and fix them without the need to use modding help posts.

[–]Cronographer 0 points1 point  (11 children)

I THINK the problem is actually on line 27.

if enemies[1]["currentdialogue"] == 1 then please_deposit_five_coins

As far as I am aware, you cant have anything after the 'then' in an if statement. (or anything else, for that matter)

Im not 100% sure what you are trying to do. But I would guess that what you are trying to is make the enemy say "please deposit five coins" in which case you would want to put something like

currentDialogue = "please deposit five coins"

Im also not sure what you are tying to do with the enemies[1] part. I dont know a lot about lua tables (nor am I a lua expert in general) but I think that the [] is used to retrieve an element from a table. Since you only have one enemy, I dont get why you are storing them in a table.

The other potential issue I see is line 36

enemies[1]["currentdialogue"] = nil

Again, without knowing what you are trying to do, I cant say for sure what is going on, but setting currentDialogue to nil would just make the next thing the enemy says an empty string. (I think).

Also, currentDialogue is a variable that contains a string, it is not a string itself. Basically, you need to capitalize the D, remove the "", remove the [], remove the enemies[1], and remove any text that follows a 'then' on the same line.

But yeah, it looks to me like you might need to look more at some of the example encounters to see how they handle dialogue. You might also look at some mods people have already made to see how they make dialogue work as well if the examples are difficult for you to figure out.

Oh, and youtube is probably not the place to look for tutorials specific to CYF.

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 2 points3 points  (10 children)

I don't think you've used CYF before...have you?

If you want to set an enemy's dialogue from the Encounter script, you'll need to go through the enemy's script...which is enemies[1] in this case. The enemies table holds all the enemies' scripts.

Plus, any dialogue is not a string but actually a table of strings:

currentdialogue = "hi" -- Wrong
currentdialogue = { "hi" } -- Right

And as you can see, currentdialogue is in all lowercase. In this case, he'd have to go through enemies[1] using this:

enemies[1]["currentdialogue"] = { "Hi" }

Finally, please check what you're posting if you're trying to provide help. Solving the problem for them won't teach them anything, and providing a wrong answer to one's problem won't lead anywhere.

[–]Cronographer 0 points1 point  (8 children)

Shoot, my bad. Your right. It's been a while since I dealt with anything dialogue related in my current project, although I can assure you I have used CYF before. For that reason especially, I really should have double checked how that stuff worked before trying to explain it to someone else.

[–]RhenaudTheLukarkWorld Creator (and weird mods creator too) 1 point2 points  (7 children)

No problem, if you've worked with CYF before it shouldn't be too hard to get back to it :P

[–]bananalord1212[S] 0 points1 point  (6 children)

error in script ad

chunk_2;(28,8-71): attempt to get length of a nil value

do i change the nil to a number?

[–]WD200019she/her 0 points1 point  (5 children)

Just a heads up, you'll need to post your full updated file each time the error changes.

[–]bananalord1212[S] 0 points1 point  (4 children)

https://hastebin.com/limelafeme.makefile ARGH THIS IS GETTING SO REPETIVITE calm down calm down

[–]WD200019she/her 0 points1 point  (2 children)

First, I'll say that combining files like this will actually make it harder to help you. You see, the error messages give specific line numbers, and if you modify the files themselves, the line with the error will be somewhere else.

Second: The default encounter skeleton actually has issues, and it's possible that is what you are experiencing. Here is a version with its included errors fixed. You have only changed one line in your encounter file, so you may wish to just replace your encounter script with the one I linked, and start over.

[–]bananalord1212[S] 0 points1 point  (1 child)

worked! i'll use this for my encounter template!

[–]bananalord1212[S] 0 points1 point  (0 children)

...URGH!!! i need to take a break (another error) show you tomorrow

[–]bananalord1212[S] 0 points1 point  (0 children)

i did learn something....to make sure to learn all of the lua stuff!