And can you create something like CCG room where players can see al images he unlocked?
And why changes i made to code are not visible or nothing?
Hey, hey, calm down - maybe no-one saw your post yet...Enerccio wrote:Noone will help?
It depends what kind of random number you want. In programmer's terms, the renpy.random object implements the Python random interface.Enerccio wrote:How do you make random number in renpy?
Code: Select all
"I roll the die..."
$ dieRoll = renpy.random.randint(1,6)
"Looks like I rolled a %(dieRoll)s..."
It's certainly more than possible...Enerccio wrote:And can you create something like CCG room where players can see al images he unlocked?
Firstly, make sure you're editing the right file - going through the launcher should make sure of this, of course - add your new code to the end of the game.rpy file that it opens when you hit 'Edit Script'. Make sure that you're saving the file before launching to make sure that Ren'Py is using the right version of the script.Enerccio wrote:And why changes i made to code are not visible or nothing?
...
Looks like it isnt compiling my scripts, how can i compile scripts?
Code: Select all
$ result = renpy.random.randint(1, 2, 3, 4)
Code: Select all
$ target = renpy.random.choice(["likely", "likely", "likely", "unlikely"])
jump expression target
Code: Select all
# Declare images used by this game.
image city1 = "#c0c0c0"
image airport = "#c0c0c2"
# Declare characters used by this game.
$ p = Character('Mike Stood', color="#c8ffc8")
$ ga1 = Character('Hot Passport checker', color="#c8ffff")
# The game starts here.
label start:
scene airport
p "Finaly in Japan."
p "My name is Mike Stood and i have been choosen for the exchange program to Japan high school."
ga1 "."
Code: Select all
I'm sorry, but an exception occured while executing your Ren'Py
script.
ParseError: On line 12 of c:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\Exchange Student/game/script.rpy: indentation mismatch.
While parsing c:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\Exchange Student/game/script.rpy.
-- Full Traceback ------------------------------------------------------------
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\bootstrap.py", line 164, in bootstrap
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\main.py", line 162, in main
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\script.py", line 392, in load_script
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\script.py", line 138, in __init__
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\script.py", line 261, in load_file
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\script.py", line 204, in load_file_core
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\parser.py", line 1344, in parse
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\parser.py", line 242, in group_logical_lines
File "C:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\renpy\parser.py", line 230, in gll_core
ParseError: On line 12 of c:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\Exchange Student/game/script.rpy: indentation mismatch.
While parsing c:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\Exchange Student/game/script.rpy.
Ren'Py Version: Ren'Py 5.6.2aIt looks to be in your code... kinda. Python - and thus Ren'Py, which is based on Python - is rather picky about indentation; you have to use spaces to indent your lines, and you have to indent each line in the same 'block' by the same number of spaces. While the general layout of the sample you posted there looks OK, and if I copy and paste it into the template script here it runs fine, there's probably some extra space/s or tabs instead of spaces somewhere which the engine is picking up.Enerccio wrote:Where is problem, in my code or somewhere else?Code: Select all
ParseError: On line 12 of c:\Documents and Settings\Enerccio\Desktop\renpy-5.6.2-full\renpy-5.6.2\Exchange Student/game/script.rpy: indentation mismatch.
Users browsing this forum: Google [Bot], _ticlock_