Post: Need help with GSX
10-28-2018, 05:38 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So I'm trying to use the new GSX Studio that was released so I can get away from GSC studio, but the project I compile in GSC studio works fine, but when I go to build it in GSX studio it gives me an error. It's giving me Code S166, Stntax error expected: identifier, [[, thread, stringLiteral, [], numberLiteral, etc etc. it's found on line 19 of
    destroyAll(array)
{
if(!isDefined(array))
return;
keys = getArrayKeys(array);
for(a=0;a<keys.size;a++)
if(isDefined(array[ keys[ a ] ][ 0 ]))
for(e=0;e<array[ keys[ a ] ].size;e++)
array[ keys[ a ] ][ e ] destroy();
else
array[ keys[ a ] ] destroy();
}


It's specifically referencing
                for(e=0;e<array[ keys[ a ] ].size;e++)
array[ keys[ a ] ][ e ] destroy();

can anyone help me with this?
10-31-2018, 11:12 AM #2
anthonything
Space Ninja
Originally posted by GunnerFrmDaO View Post
So I'm trying to use the new GSX Studio that was released so I can get away from GSC studio, but the project I compile in GSC studio works fine, but when I go to build it in GSX studio it gives me an error. It's giving me Code S166, Stntax error expected: identifier, [[, thread, stringLiteral, [], numberLiteral, etc etc. it's found on line 19 of
    destroyAll(array)
{
if(!isDefined(array))
return;
keys = getArrayKeys(array);
for(a=0;a<keys.size;a++)
if(isDefined(array[ keys[ a ] ][ 0 ]))
for(e=0;e<array[ keys[ a ] ].size;e++)
array[ keys[ a ] ][ e ] destroy();
else
array[ keys[ a ] ] destroy();
}


It's specifically referencing
                for(e=0;e<array[ keys[ a ] ].size;e++)
array[ keys[ a ] ][ e ] destroy();

can anyone help me with this?

could be two things:

1. array is a keyword, therefore using it as an identifier is invalid, sort of like how you dont call your variables 'if' or 'else'. Fix it by renaming your variable to something else, or adding underscores. Easiest way is to just use find/replace if this is a GSC project being imported.

2. there may be an artifact in the lexical parsing from the old grammar that involves '<' being appended, although i doubt it.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo