What is wrong in this verse script i tried everything

Persistent modifier to keep the state across games

persistent

A simple test class

class SimpleTestClass extends device {
# A simple variable
var testVariable: int = 0 # Initialize variable

# A simple function to log a message
testFunction(): void = {
    log("Hello, this is a test function!")
}

}

and the error is

[{
“resource”: “/C:/Users/ziadh/OneDrive/Documents/Fortnite Projects/MyProjectA/Plugins/MyProjectA/Content/BerserkMode.native.verse”,
“owner”: “generated_diagnostic_collection_name#0”,
“code”: “3100”,
“severity”: 8,
“message”: “vErr:S77: Unexpected "SimpleTestClass" following expression”,
“startLineNumber”: 5,
“startColumn”: 7,
“endLineNumber”: 5,
“endColumn”: 7
}]

1 Like

what is BerserkMode.native.verse? do you have a screenshot on where you have the script at?
and also MOVE YOUR PROJECTS out of ONEDRIVE it can corrupt your files

this is an eror from before i removed it the one under it is the one i am doing now
and the script is in myproject folder in vs code

wait this is actually another file i that iput for my code but iput another name so i send it here

Can you show the error you get in vscode? or when building verse?

can you show a full screen that shows whats written around/nearby line 4?

1 Like

try writting it like this

BerserkModeDevice := class(creative_device):

ok

also replace the active players line with this

var ActivePlayers : agent = array{} # Track Players In berserkMode

ok i think it works now but i got another error on line 26 look

for(Player:ActivePlayers):

I’d recommend looking at some verse code to understand the syntax these seem to be based in some other language Look at the documentation for verse it might help Programming with Verse | Unreal Editor for Fortnite Documentation | Epic Developer Community

i used chat gpt

Yea I would NOT RECCOMEND using that at all chat gpt is really incorrect and unreliable especially regarding verse

1 Like

ok thank u i will learn it