Error for a dse.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Error for a dse.

#1 Post by ZaqazDeath »

I'm a total newbie. I tried copying Py'Tom's dse and I failed. Can you help me? Thanks.
O.O so much people downloaded this that did not reply..
Attachments
DSE Copy Tutorial.zip
(416.07 KiB) Downloaded 42 times
Last edited by ZaqazDeath on Mon Nov 28, 2011 10:20 pm, edited 1 time in total.

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#2 Post by ZaqazDeath »

Here. In case you didn't know what to help with? :D? I don't know...

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/main.rpy", line 138, in script call
        call events_run_period
  File "game/event_dispatcher.rpy", line 255, in script
        python hide:
  File "game/event_dispatcher.rpy", line 262, in python
                if not i.check(eobjs):
  File "game/event_dispatcher.rpy", line 60, in python
                    if not i.eval(self.name, valid):
  File "game/event_dispatcher.rpy", line 99, in python
                    return eval(self.expr)
SyntaxError: EOL while scanning string literal (<none>, line 1)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "C:\Users\Ashley\Desktop\renpy-6.13.7\renpy\execution.py", line 261, in run
  File "C:\Users\Ashley\Desktop\renpy-6.13.7\renpy\ast.py", line 630, in execute
  File "C:\Users\Ashley\Desktop\renpy-6.13.7\renpy\python.py", line 978, in py_exec_bytecode
  File "game/event_dispatcher.rpy", line 262, in <module>
  File "game/event_dispatcher.rpy", line 60, in check
  File "game/event_dispatcher.rpy", line 99, in eval
  File "C:\Users\Ashley\Desktop\renpy-6.13.7\renpy\python.py", line 1015, in py_eval
  File "C:\Users\Ashley\Desktop\renpy-6.13.7\renpy\python.py", line 260, in py_compile
SyntaxError: EOL while scanning string literal (<none>, line 1)

Windows-post2008Server-6.1.7601-SP1
Ren'Py 6.13.7.1646
 

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Error for a dse.

#3 Post by DragoonHP »

To put it very simply, this error occurs when you call the same event twice in a single day... because the check function returns the value as false, ie, tells Ren'Py that the event is not valid...

For eg, if a player selects Mathematics for two classes in a same day, it will pop up with this error... because the venet is supposed to happen once...

So what you need to do is make different events for different time of the day (edit the main.rpy file)... and it will not throw that error any more...

PS: I am sure that the DSE can be made to behave in this pattern, but it's too much re-coding... :-p

Hope I helped...

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#4 Post by ZaqazDeath »

THANKS. and we meet again... Also when I came here to check, it was downloaded 5 times... One reply. o.O
Wait... Were you always a veteran? o.o

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Error for a dse.

#5 Post by DragoonHP »

No... it's more of a post title thing...
When you will have more than 200 posts, you will be a "Veteran" too... :-)

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#6 Post by ZaqazDeath »

Oh... So it's not like helping people, but just either posting or spamming posts?

Soraminako
Veteran
Posts: 277
Joined: Sun Sep 04, 2011 1:36 am
Projects: A thingie without a title. With messy code.
Contact:

Re: Error for a dse.

#7 Post by Soraminako »

Erm, the idea is that hopefully we're always posting to help someone... and not to spam or anything like that! XD *lol*

The "veteran" thing is not specific to the help section. It's more of a "veteran in forum presence" than an indicator of being a frequent helper or something like that, since it's about the posts in all the areas of the forum, and not a thing limited to the help section.
(I drew my avatar especially to express the scary feeling I get from the code as I type it... XD)

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Error for a dse.

#8 Post by DragoonHP »

Yup... pretty much...
And admins can give out custom Member Title too... there are a few member here with custom titles, but that's rare...

Okay, enough going off-topic...

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#9 Post by ZaqazDeath »

lol. k. also, can u tell me how to make a random chooser that changes the specific integers (i want an "job" or whatever money/stat increase) that are inside? uh... basically, i am asking that it chooses for example, the amount of money you get when you work here, but it will increase with an certain item that boosts it or if you have a certain stat that will increase it. uhh... umm... so if you have 20 points of this certain stat, then you get one more dollar (or any currency). thanks. i really appreciate and um.. how do you say this... feel honored? (something close to that..) that two veterans are in my post. thanks once again. oh, and umm... if this is written in capitals, sorry about that... im writing this in my wii right now... anyway, once AGAIN thanks.

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Error for a dse.

#10 Post by DragoonHP »

So what do you need exactly?
A random function or the job function.

And no need to be flattered, I can only say for myself, but I am just a regular member.

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#11 Post by ZaqazDeath »

Umm... I want a function that chooses a random number from like... lets say 5-10. And umm pretend that that is the damage that you will inflict. But if you have an umm... Claymore it will increase your random damage by 10. I umm want a function that will choose a random number from 5-10 and add 10 if claymore is equiped. or if ur strength is 20, each, it will increase your randomly chosen damage. Yup. And also a function of a list of where it (the function of claymore attack += 10) will be stated.
Am i asking too much... >.<;
P.S. O.o You responded really fast... Too fast... o.o

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Error for a dse.

#12 Post by DragoonHP »

For the random part, you can use Re'Py rnadom function...

Code: Select all

It probably won't compile properly.... but it is just to give you a idea...
damage = renpy.random.randint(5,10)

if claymore = "equip":
    damageFinal = damage + 10
else:
    damageFinal = damage
PS: I don't understand the last part of your question.

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#13 Post by ZaqazDeath »

AWESOME. How do you know everything? ... Also, how should I define equip? And can you also tell me a stat version? thanx

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Error for a dse.

#14 Post by DragoonHP »

Defining Equip can be a rather tiresome task.
At the very basic level, you can have menu choices for an equipment screen, or at the hardest a custom screen, with lots of flashy stuff.

And the better approach will be to making Equip a variable such as,
equipWeapon = "Claymore"

And if you go for a custom screen, the best approach will be using loops if you have a large number of weapons.
Sorry, I can't give you the code, just came back from college, exhausted from examination.

And what do you mean by stat version?
If you mean s screen that gives the stats, it will be easy.
Just store the value in variables and then using bars or values, show them.

ZaqazDeath
Regular
Posts: 46
Joined: Tue Nov 08, 2011 3:55 pm
Contact:

Re: Error for a dse.

#15 Post by ZaqazDeath »

Umm.. Uh, I mean like if you have 20 strength (stat) then automatically, it will increase your final damage (The randomly chosen attack + claymore) by 1... Am I asking for too much? Sorry...

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]