Script calls and in game variables

Status
Not open for further replies.

Arcandrus

Villager
Member
Joined
Jan 22, 2016
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Hey guys, new to the forum so not sure if I'm posting in the right place but here goes.


Pretty new to RPG Maker, but I do some knowledge of other languages... heres my question:


I'm using Vlues Basic Quest Control system, and within it he has set a script call for "set_obj:)questid, :objid, value)" which sets the designated objective to desired value.


Is there anyway to call the value of a global variable, and have the script set that as the objectives value?


I tried something like this:


set_obj:)questid001, :objid1, $game_variables[0001])


but it returns errors I dont understand currently, still learning Ruby :)  But almost 100% sure I've stumbled into a syntax issue


Any help trying to resolve this would be lovely :)  
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
do not use zeroes in scripted IDs - that is one mistake ([1], not[0001])


Additionally it might be that the function requires direct values - that depends on the script and I don't know what to do then.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Please post a link to the script so people can find it quickly without having to search around.  (that does not mean posting the script itself into your topic)
 

Arcandrus

Villager
Member
Joined
Jan 22, 2016
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Apologies, as I said I am new here, I'll be more careful about where I post in future.


Here is a link to Vlues pastebin where the script I'm using is  http://pastebin.com/tyM7s1Pj
 

Arcandrus

Villager
Member
Joined
Jan 22, 2016
Messages
11
Reaction score
0
First Language
English
Primarily Uses
do not use zeroes in scripted IDs - that is one mistake ([1], not[0001])


Additionally it might be that the function requires direct values - that depends on the script and I don't know what to do then.


Thank you Andar, that is something I didn't realize, I will test this and get back to you :)  
 

Arcandrus

Villager
Member
Joined
Jan 22, 2016
Messages
11
Reaction score
0
First Language
English
Primarily Uses
ok so I realize now that theres was very little information in my first post, sorry


Any ways I have now attached a snap of the error itself and one of the event I'm working on


My goal is to have obj1 value be equal to that of variable 1 (Slimey Slimes)


Thanks again guys :)


erroc.png


error.png
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Arcandrus, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you need to add to, or change, information, and yours is the last post in the thread, please just edit it rather than making a new post.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
There are multiple issues in your script calls.


Number 1:


It is not "$game.variables" but "$game_variables". So, not a point between the words, but an underline.


Number 2:


This is which gets triggered in the error report.


You can not divide a method call between multiple lines like that. The only places you can start a new line is when the code clearly gets that the method call is not finished.


This means that you can start a new line after commas, operator signs (+, -, etc), logical operators (&&, ||, etc), and some other signs.


Number 3:


The first script call (which triggers the error) is wrong in structure.


I only guess here, but I think it should be:

Code:
set_obj(:questid001,:obj1,$game_variables[1])

This will pass variable 1 to be the value of the script call. 


I did not test that script (didn't even read the instructions, to be honest), so this is just my best guess on how this script call works.
 

Arcandrus

Villager
Member
Joined
Jan 22, 2016
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Number 2:


This is which gets triggered in the error report.


You can not divide a method call between multiple lines like that. The only places you can start a new line is when the code clearly gets that the method call is not finished.


This means that you can start a new line after commas, operator signs (+, -, etc), logical operators (&&, ||, etc), and some other signs.


This... Wonderful piece of information, I broke the script into three lines at each comma as you suggested and amended my errors, all working now, Thanks everyone! Think we can close this up now :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I will close this for you now, but next time, please report the post to ask for it to be closed as instructed in the forum rules (see link in my earlier post), and any moderator will take care of it. 
 
Last edited by a moderator:
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,855
Messages
1,017,007
Members
137,563
Latest member
MinyakaAeon
Top