• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Index missing for array variable

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2015
Messages
53
How to fix it?
JASS:
function Trig_Rupture_Loop_Func001Func001Func001Func007Func001C takes nothing returns boolean
         local integer array = udg_RuptureTiempo
   local integer array = udg_Rupture_Loop
 if ( not ( udg_RuptureTiempo[udg_Rupture_Loop] == 8 ) ) then
        return false
    endif
    return true
endfunction

error:
Line 24695: [maa???] Index missing for array variable udg_Rupture_Loop
 
local integer array = udg_RuptureTiempo
local integer array = udg_Rupture_Loop
These statements are not legal. They will throw a syntax error.

It is also not legal to re-declare a global variable name as a local (name overload). It used to be but some patched stopped that.

You might want to try...
JASS:
    local integer array RuptureTiempo
    local integer array Rupture_Loop
Remember to update all references to the variables.
 
Well it deleted one of the problems, I wanted to start code over again because the previous one was a mess.
So I converted GUI trigger into a custom text, copy pasted it and now I am getting:
Debug Compiling:
PJASS ERROR(S) FOUND!Unexpected Code Exception!
Unrecognized PJASS (syntax) error
jasshelper error: pid 5756 exit 1

I don't understand, I did the same as before and I was getting only those variables errors, now I dont even know whats wrong
 
JASS:
//***************************************************************************
//*
//*  Global Variables
//*
//***************************************************************************

globals
    // User-defined
    integer                 udg_a                      = 0

    // Generated
    trigger                 gg_trg_Melee_Initialization = null
    trigger                 gg_trg_qwe                 = null
endglobals

function InitGlobals takes nothing returns nothing
    set udg_a = 0
endfunction

function Trig_qwe_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_qwe takes nothing returns nothing
    local integer udg_a = 5
    set gg_trg_qwe = CreateTrigger(  )
    call TriggerAddAction( gg_trg_qwe, function Trig_qwe_Actions )
endfunction

fully valid 1.26a editor code, which will normally run(tried). As you can see output is missing things, but this is because I used the vanilla editor
 
Jasshelper accepts and parses it into valid jass.
I hate that program some times...

So it loops through all 8192 indexes and bulk copies it to the local (expected correct behaviour)? Or does it inline the global as the local (strange but possible behaviour)?


fully valid 1.26a editor code, which will normally run(tried). As you can see output is missing things, but this is because I used the vanilla editor
Looks fine to me, however it does not involve declaration setting an array to another array.
 
Status
Not open for further replies.
Back
Top