Skip to content

scriptcomp: ERROR: "for" STATEMENT CANNOT BE FOLLOWED BY A NULL STATEMENT.  #96

@Finaldeath

Description

@Finaldeath

Script example of something that should work:

void main()
{
    int nCount;
    for (nCount = 1;GetIsObjectValid(GetNearestObjectByTag("WP_PEASANT_EXIT",OBJECT_SELF,nCount));nCount++);

    // Do more things here...
}

Works with ; replaced by {} or a while loop.

For it used in Bioware's code see nw_pw_peasant9.nss in Chapter 1 and Chapter 4 of the OC.

@mtijanic asked me to log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions