Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Roxas_4

Ccoa's UMS problem

Question

Hi there. I am using Ccoa's UMS in my project.

I want to put a name in the text box but the name I want to put is the name someone chooses.(See attached picture)

 

post-20336-0-66424800-1314624142_thumb.png

 

 

Here says

Out of message codes (use in a Script event command):

...

$game_system.name = "name" - change the text of the name window to name

Here goes my question: Can I put the chosen name (\N[1]) in the text box by calling the script, so it is something like $game_system.name = "\N[1]"? How could I make this work?

 

 

post-20336-0-68253700-1314624149_thumb.png

post-20336-0-30166400-1314624161_thumb.png

 

Has someone the same problem? Does anyone how to solve it?

 

Finally I want you to know that I'm Spanish and I could have problems with English. Also,as you see in the second attached picture, I use an Spanish version of RMXP.

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Try this:

$game_system.name = $game_actors[1].name

 

Basically, the $game_actors object stores all the actor data, after being initialized (so it would store the new name given to the player)

 

The syntax (for other actor names) would be as follows:

$game_actors[actor_id].name
# actor_id is the ID of the actor in the database
# EX. $game_actors[1], $game_actors[2], etc...

 

Lemme know if that works.

Share this post


Link to post
Share on other sites
  • 0

It doesn't work. :( It says that "NoMethodError" happened because of undefined method 'name' for [1]:Array.

I don't know what does that mean because I am not a scripter.

Well, thank you anyway.;)

Share this post


Link to post
Share on other sites
  • 0

That is interesting. Can you please post exactly what you put in the call script box?

 

This should work, and it should DEFINITELY not give you a noMethodError.

 

If you got a no method error, either you have the incorrect statement, or you have a script that has modified the $game_actors object greatly.

 

Looking at the error, it almost looks like $game_actors[1] points to an array, when it should point to an instance of the Game_Actor class.

Share this post


Link to post
Share on other sites
  • 0

That is interesting. Can you please post exactly what you put in the call script box?

 

This should work, and it should DEFINITELY not give you a noMethodError.

 

If you got a no method error, either you have the incorrect statement, or you have a script that has modified the $game_actors object greatly.

 

Looking at the error, it almost looks like $game_actors[1] points to an array, when it should point to an instance of the Game_Actor class.

 

I put exactly what you said, using Copy-paste, but when I try to talk to this event, it gives me the noMethodError. Here are screenshoots. (the second has some words in spanish if you wanna know what they mean just tell me.)

 

post-20336-0-66316900-1314640550_thumb.pngpost-20336-0-39093500-1314640559_thumb.png

 

 

Maybe my version's $game_actors script was modified before distributing it. Could you send me the game_actors script to compare?

 

Well if we can't find a solution I will have to erese the option to choose the name :unsure:

Share this post


Link to post
Share on other sites
  • 0

AHA I figured it out (i believe)

 

It is neither of our faults, and only the fault of RPG Makers "call Script" box (the fact that it is so small).

 

try this:

$game_system.name =
$game_actors[1].name

 

Just put the $game_actors[1].name entirely on the second line. Because of the not so great call script box, it is being interpreted as

$game_system.name = $game_actors # Name is set to the entire $game_actors object
[1].name # Creates an array with 1 element, and tries to call the method "name" which doesn't exist for arrays

 

So by separating the statement into 2 lines, it should put $game_actors[1].name into name correctly.

 

Let me know how that goes.

Share this post


Link to post
Share on other sites
  • 0

AHA I figured it out (i believe)

 

It is neither of our faults, and only the fault of RPG Makers "call Script" box (the fact that it is so small).

 

try this:

$game_system.name =
$game_actors[1].name

 

Just put the $game_actors[1].name entirely on the second line. Because of the not so great call script box, it is being interpreted as

$game_system.name = $game_actors # Name is set to the entire $game_actors object
[1].name # Creates an array with 1 element, and tries to call the method "name" which doesn't exist for arrays

 

So by separating the statement into 2 lines, it should put $game_actors[1].name into name correctly.

 

Let me know how that goes.

Yeah, that works. That's perfect. Many thanks.:alright: And thanks for the explication in your last post, I think i've learnt some scripting.^_^

 

This is the prove that it works:

 

post-20336-0-52934300-1314642420_thumb.png

 

 

This topic can be closed.

Edited by Roxas_4

Share this post


Link to post
Share on other sites
  • 0

Nice job kell!

 

 

Seeing problems solved makes me happy. ^__^

 

@Roxas, make sure to stick around the forums and ask any further questions you might have.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...