• 🏆 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!

help, save/load code for variables?

Status
Not open for further replies.
Level 2
Joined
Jul 8, 2006
Messages
10
Hey. Was trying to add the ability to save and load custom variables for players in triggerhappy's CodeGenerator, but can't find a way to do it...

example.

-save-
Set SaveCount = [SaveCount + 1]
Set Save[SaveCount] = test

-load-
Set LoadCount =[LoadCount + 1]
Set test = Load[LoadCount]

the variable test turns into 1 no matter what it was before... so I think the save part is wrong, or maybe the load part, or both. I don't know what I did that screwed it up.

edit: btw, the variable test is an integer.
 
Hey. Was trying to add the ability to save and load custom variables for players in triggerhappy's CodeGenerator, but can't find a way to do it...

example.

-save-
Set SaveCount = [SaveCount + 1]
Set Save[SaveCount] = test

-load-
Set LoadCount =[LoadCount + 1]
Set test = Load[LoadCount]

the variable test turns into 1 no matter what it was before... so I think the save part is wrong, or maybe the load part, or both. I don't know what I did that screwed it up.

edit: btw, the variable test is an integer.

how do you test it? do you actually -save then -load? if not then that is your problem. I think the only way to test them is to -save then -load (that's what I do when I add something to the system by AceHeart but basically they work the same)
 
Level 2
Joined
Jul 8, 2006
Messages
10
to test it, I type in a command that makes the test variable 5. then I saved it. Then I loaded it. The variable turned into 1. No matter what the variable test value was, it always turned into 1, meaning it wasnt saving correctly, or maybe it wasnt loading correctly.

I am trying to do this in gui using what warcraft world edit gives me, but I cant find a way to do this.

What im trying to do is, make a multiplayer game with variables for smithing, mineing, logging, fishing, fletching, etc. I need to find a way to give each person their own personal variable for these things, and save and load them... But I dont know if thats possible... hmm..
 
Status
Not open for further replies.
Top