Issue Publishing Map – VerseBuild Error

same

What’s the module id and version? could you copy them over?

1 Like

This is the module and id version of the LIVE CODE, because i create a new release with another private version cretaed: MODULE: [22d8061a-458e-747b-3652-3889f63aec95](javascript:) and VERSION: 46

And this is the MODULE of the ROOT MODULE that have the code with the error: [22d8061a-458e-747b-3652-3889f63aec95](javascript:) and version: 69

Ok what happens if you go here?
https://content-service.bfda.live.use1a.on.epicgames.com/api/content/v2/module/22d8061a-458e-747b-3652-3889f63aec95/version/69/staged-files/Content/player_stats_table.verse

1 Like

OMG, you are hacker, that link works, now, what i have to do?

Well that should be your verse file, back up your project before changing anything and try putting this verse file back in and see if it publishes and passes backwards compatibility

1 Like

Hi Mineblo, there’s a bug. I noticed that the code causing the error is found in the early versions. However, when I checked the root module, there’s no code referencing player_stats_table.verse, which makes it even stranger, and I honestly don’t know what to do anymore :frowning:

it doesn’t matter if you no longer reference or use the data, once you’ve created persistent player data its there for good, you’ll need to keep the device in your island for good even if its not used now.

2 Likes

you know how to fix that? i don’t care if i have to begin again, but i want to save the island code

I USE TE FORTNITE IA AND GIVE ME THIS CODE

using { /Verse.org/Simulation }
using { /Fortnite.com/Devices }

Persistable struct for player stats

player_stats_table := class:
Score : player_stat = player_stat{}
Wins : player_stat = player_stat{}
Losses : player_stat = player_stat{}
Kills : player_stat = player_stat{}
Deaths : player_stat = player_stat{}
Elo : player_stat = player_stat{}
Version : int = 1

player_stat := class:
Value : int = 0
CurrentValue : int = 0
HighestValue : int = 0

Constructor to create new stats table

MakePlayerStatsTable(
ScoreIn : player_stat,
WinsIn : player_stat,
LossesIn : player_stat,
KillsIn : player_stat,
DeathsIn : player_stat,
EloIn : player_stat,
VersionIn : int
) := player_stats_table:
Score := ScoreIn
Wins := WinsIn
Losses := LossesIn
Kills := KillsIn
Deaths := DeathsIn
Elo := EloIn
Version := VersionIn

Global weak_map to store player stats

var PlayerStatsMap : weak_map(player, player_stats_table) = map{}

Device class to enable use in UEFN

player_stats_device := class(creative_device):
# Example usage
InitializePlayerStats(ForPlayer : player) : void =
if (PlayerStatsMap[ForPlayer]):
Print(“Player already has stats”)
else:
if (set PlayerStatsMap[ForPlayer] = MakePlayerStatsTable(
player_stat{}, player_stat{}, player_stat{}, player_stat{}, player_stat{}, player_stat{}, 1)):
Print(“Initialized stats for player”)

# Subscribe to player join events
OnBegin<override>()<suspends>:void =
    GetPlayspace().PlayerAddedEvent().Subscribe(OnPlayerAdded)

# Initialize stats when a player joins
OnPlayerAdded(Player : player):void =
    InitializePlayerStats(Player)

hi bro i have the same problem and i really need help , i tried the “solution” code that you found and it has 1 verse build error , PLEASE SOMEONE HELP i need to update my map

I’d recommend making a new thread but essentially you need to get your verse files as they were when you published your island, you need to have anything persistence related intact for backwards compatibility reasons.

If it helps on Q3 they will relax backwards compatibility checks