Jump to content
Rpg²S Forum
  • 0

Scrivere il valore di una variabile


Squall_Leonheart
 Share

Question

Salve,stavo cercando di far si che una window visualizzi il valore di una variabile...Tipo se la variabile e 5 nella finestra appare la scritta 5...

 

Ho provato cosi ma non credo sia esatto...

 

self.contents.draw_text (0, 0, 120, 32, $game_variables_value(0012))

 

 

ovviamente il font size ed etc ci sono...L'errore credo stia su come scrivo il valore...

Iscriviti sul mio canale youtube -

https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriber

Seguimi su Instagram -

https://www.instagram.com/ancestralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

prova a scrivere:

self.contents.draw_text (0, 0, 120, 32, "" + $game_variables_value(0012))

(o almeno in java per stampare valori su stringa si fa così, magari funziona pure in ruby XD)

"Dopo gli ultimi Final Fantasy, ho capito solamente una cosa: che il gioco è bello quando Nomura poco."

Making is not dead. You are dead.
RELEASE: La Bussola d'Oro | Download | Video di anteprima - La Partenza di Hanna

http://i.imgur.com/cFgc2lW.png

Prova Standrama!

Link to comment
Share on other sites

  • 0
Purtroppo dà un errore di sintassi

Iscriviti sul mio canale youtube -

https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriber

Seguimi su Instagram -

https://www.instagram.com/ancestralguitarist/

---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------

FACE CONTEST # 3
BANNER CONTEST #69

Link to comment
Share on other sites

  • 0

Scusatemi, ma perchè scrivete $game_variables_value? Dovrebbe bastare $Game_Variables :sad:

Poi per trasformarlo in valore numerico bisognerebbe scrivere .to_s alla fine.

 

Edit: ho fatto una prova bisogna scrivere così:

self.contents.draw_text(4, 0, 120, 32, $game_variables[1].to_s, 2)

Edited by MasterSion

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...