Login Page - Create Account

Support Board


Date/Time: Wed, 05 Mar 2025 04:07:45 +0000



Post From: create a custom C++ class that manages trade/logic

[2022-01-09 10:03:29]
User99735 - Posts: 234
it appears I don't need to use sc.GetPersistentInt(11) anymore--since the class (struct) is persistent, right?
The class is persistent, but the pointer to the class is not persistent.

sc.SetPersistentPointer(some_struct_pkey, new some_struct(sc));
This line can be moved to the sc.SetDefaults block, without null check, to ensure that the structure is always initialized at startup.