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
Mineblo
(Mineblo)
October 11, 2024, 4:50pm
2
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
Mineblo
(Mineblo)
October 11, 2024, 5:26pm
5
Can you show the error you get in vscode? or when building verse?
Mineblo
(Mineblo)
October 11, 2024, 6:28pm
7
can you show a full screen that shows whats written around/nearby line 4?
Mineblo
(Mineblo)
October 11, 2024, 6:30pm
9
try writting it like this
BerserkModeDevice := class(creative_device):
Mineblo
(Mineblo)
October 11, 2024, 6:31pm
11
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
Mineblo
(Mineblo)
October 11, 2024, 6:37pm
13
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
Mineblo
(Mineblo)
October 11, 2024, 6:39pm
15
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