• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

argument

  1. Leif

    GML Expected number arguments of function

    Good day. Please help to solve syntax issue. I use function, that have four arguments, and all of them are optional. Inside I check all of arguments with is_undefined( _argument ), so there're no compile errors and all works perfectly. BUT: my Syntax Errors tab is full of warnings like...
  2. josyanf1

    [SOLVED] Error in arguments for scripts

    Hello! I have noticed argument errors on some of my scripts. Is it possible that it is because of the way the parameters are commented? What is the right way? A greeting and thanks in advance! *This is a example script *And this the argument error:
  3. F

    Mac OSX Printing Out Wrong Array

    Hey guys I'm new to Game Maker Studio and new to the language. I'm making a game and have been working on the dialogue system. This chunk of code was designed for characters respond to a set of choices, the dialogue starts by printing out the first element of the line_array, which it does, then...
  4. duran can

    SOLVED Although I enter 4 arguments it shows 5

    and getting error, whats wrong?
  5. S

    Illegal access of argument in script

    When I attack it triggers this error ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object object3: illegal access of argument, argument is not provided...
  6. LittleAngel

    Argument in shader

    Hi ! Is it possible to pass an argument through a shader? I get it, yes, but I don't really understand. I have a shader who colors a sprite in red: varying vec2 v_vTexcoord; varying vec4 v_vColour; void main(){ gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord)...
  7. P

    SOLVED "I32 argument is array

    Hello this is my first post on this website. I've been trying to make a functional saving system but when I try to destroy the "wrapper" this error shows up. Here is my code: var root = ds_list_create(); with(obj_psvng) { var map = ds_map_create(); ds_list_add(root,map)...
  8. E

    Multiple script arguments malfunction.

    Hello, guys. I made a script that has multiple arguments, it looks like this: /// val_highest(value1, value2, value3, ...) for (var i = 0; i < argument_count; i ++) { for (var j = 0; j < argument_count; j ++) { if (argument[i] > argument[j]) { return...
  9. B

    GameMaker REAL argument is undefined?

    IDE: v2.2.2.413 Runtime: v2.2.2.326 Hey, I'm having an issue with the new Studio 2 update that just hit. I recently updated and out of the blue, I'm having an issue converting a saved string to a real variable using the "real" function. I've switched back to the previous 2.2.1.291 and the...
  10. Evanski

    GameMaker [Solved]How do I do the script @param stuff?

    I want to start messing around with the @params like this /// @Description A test of the params /// @param Object /// @param x /// @param y /// @param count scr_testparam(obj_enemy,256,145,69) But what I want to know is how would I use it with the Built in variable (argument0-15) I'd love to...
  11. E

    Legacy GM How to insert an n-number of arguments in script?

    Hey, pals. I started to learn scripting in GM:S very recently. I've created a script and want to insert in n-number of arguments there. scr_instances_exist(obj1, obj2, obj3, ...); So when you write an objects in brackets it will be set as arguments, so how I can perform it? Should I create...
  12. Dr_Nomz

    GML [SOLVED] Better understanding of arguments?

    I understand quite a bit of code, but there are isolated examples where I don't fully understand certain bits, like this for example: // Check Item, then Slot. //Argument0=Specific Item to put into slot. //Argument1=Specific Slot for the item to go into. if (global.inventory[argument1] == -1){...
  13. N

    (SOLVED) Error when passing an object as a script argument

    Greetings, first time posting here. I'm trying to make a standard turn-based battle system, but I keep having trouble when starting the battle from a script. I'm trying to pass enemy objects as arguments, so the script assigns them to the enemy array in the battle_logic object. Here's my code...
  14. kingsushi001

    Legacy GM [SOLVED] Using argument0 to create ds_grid id

    Hi everyone I seem to be having a problem with the following. This is my script: ///map_grid(grid_name,map_width,map_height) map_width=argument1; map_height=argument2; argument0=ds_grid_create(map_width,map_height); for (h=0; h<map_height; h++) { for (w=0; w<map_width; w++) {...
  15. S

     please remove '-' at the and of script parameters/arguments

    please remove '-' at the end of script parameters/arguments on intellisense it breaks the feel of built in functions I don't even know why its there it the first place the user can just add a '-' to it if they want it. no need to force it. EDIT: if anybody still doesn't know what I mean if you...
  16. K

    Can I add argument details in my created script?

    Every built-in scripts in Game Maker: Studio has at least details that you can see the Execute Script bottom and read what you should type based on the argument currents inside the script parenthesis. I just wonder if I can do that for my script in 1.x, if it is please tell me.
  17. H

    [SOLVED] Argument information/description for scripts

    When I type instance_create() a little description shows up below that says: instance_create(x,y,obj) how can I achieve this for a custom script? I want to see the amount and type of arguments I need to fill in while I'm typing the script name.
  18. A

    [SOLVED] Problem with argument_count

    Hi, Like what's written in the title, I have problem the function argument_count, I do not know how the argument_count function really works, when I put optional args I get this error message: So I need help to find the error: I have the script "scr_textbox": ///scr_text(str, speed, x, y...
  19. M

    GameMaker Script Parameter Display on Bottom not Working

    Hello, I have the problem that I can't display my own script parameter on the bottom of the code screen. If I create an script like "scr_executeSomething" then i write in the first line: ///scr_executeSomething(Parameter1, Parameter2); //Title of the segment of code { code belong here... }...
  20. G

    Access object argument

    Good night, I had a question in some tests, I create the object with the: Instance_create And inside it has a create, In which a = argument0; b = argument1; move_towards_point (mouse_x + a, mouse_y + b, 10); How do I submit this argument?
Top