SC2Mapster Wiki
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Help
SC2MAPSTER
News
Maps
Assets
Teams
Authors
Forums
Paste
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
SC2Mapster Wiki
1,003
pages
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Help
SC2MAPSTER
News
Maps
Assets
Teams
Authors
Forums
Paste
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Errors/Debugging
(section)
Back to page
Edit
VisualEditor
View history
Talk (0)
Edit Page
Errors/Debugging
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Example==== Trying to implicit bulk copy an array consisting of 5 bytes is not allowed. typedef byte[5] bulk_t; bulk_t bulka; bulk_t bulkb = bulka; // Error : Bulk copy not supported Reducing array size to 4 bytes or less allows for the occurrence of implicit bulk copy. typedef byte[4] bulk_t; bulk_t bulka; bulk_t bulkb = bulka; If shortening type length is not possible then a bulk copy function can be written and called. This function explicitly copies every element of data from a reference of a type to another reference of the same type. To pass a struct or array type as a function parameter consider using a reference instead of the bulk copy as it becomes very expensive for large types. typedef byte[5] bulk_t; void bulk_t_bulkcopy(arrayref<bulk_t> to, arrayref<bulk_t> from){ int i; for( i = 0 ; i < 5 ; i+= 1 ){ to[i] = from[i]; } } bulk_t bulka; bulk_t bulkb; // Called at map initialization. void bulk_t_init(){ bulk_t_bulkcopy(bulkb, bulka); }
Summary:
Please note that all contributions to the SC2Mapster Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab