• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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?
 
How is declaring a local variable saving?
 
"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
 
@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
 
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.
Back
Top