• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Is there a way to save "code" type?

Status
Not open for further replies.

Deleted member 219079

D

Deleted member 219079

I mean this: type code // One of the seven basic native types

Is there a way to save it?
 

Deleted member 219079

D

Deleted member 219079

How is declaring a local variable saving?
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
"one of 7 basic types" I only counted 6: integer, real, string, handle, boolean, code. Am I missing something?

Just nit-picking :D

Edit: your question is basically the same as "how is storing something in variable saving?"

You can also store function inside global variable, code however, cannot be stored inside hashtable or gamecache, and cannot be declared as array. All code variables must take no arguments, and they can return anything, even tho current and the older pjass versions only allow functions that return nothing.

Also declaration is this:
JASS:
local code c

what he wrote is
JASS:
local code c = function someFunc

I hope you see the difference
 

Deleted member 219079

D

Deleted member 219079

@edo494

Thanks for nit-picking, solved everything 100% !! +1000 rep omggg!! +1000 rep tomorrow too! jk

As I suspected, code can't be permanently stored :/ Thanks for answer, already made my system not to require storing code.

@IcemanBo
If you don't like my answer, you should explain what you wanna achieve.
Don't hit me!!

here have a +rep instead :)


edit: added jk and overline
 

Deleted member 219079

D

Deleted member 219079

Yeah, sadly no code arrays :/

But hey, this wasn't that important for my system, thanks for confirming this though!
 
Status
Not open for further replies.
Top