Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Call Putvar() isnt creating the .ini whats wrong?


Sk8erace1
 Share

Recommended Posts

Hello all its been a while sence ive scripted in eclipse and am not sure if putvar ever made the ini by its self but im pretty sure it did and ive checked over my scripts over and over considering its just 1 line with many variables (not the scripting variable i mean the same line pated 4 times but with a slight change) so if 1 lines wrong they all are but as i said ive checked over them with the "help" in the script editor everything should be running fine and ive never realy made my own sub so maby the problem is there but idk so could any of you out there help me out here?
btw heres my sub remember im new to making subs and a lil rusty on sadscript its self

'********************************
Sub PlayerSave(index)
'********************************
Dim Name

Name = getplayername(index)

Call PutVar("Scripts\Players.ini", Name,"Map: ", getplayermap(index))
Call PutVar("Scripts\Players.ini", Name,"X: ", getplayerx(index))
Call PutVar("Scripts\Players.ini", Name,"Y: ", getplayery(index))
Call PutVar("Scripts\Players.ini", Name,"STR: ", getplayerstr(index))
Call PutVar("Scripts\Players.ini", Name,"DEF: ", getplayerdef(index))
Call PutVar("Scripts\Players.ini", Name,"Magic: ", getplayermagi(index))
Call PutVar("Scripts\Players.ini", Name,"Speed: ", getplayerspeed(index))
End Sub

everything works fine but it doesnt seem to be creating the ini file at all.

oh and 1 more thing i have a command to call the script and all thats in this command is this

Case "/save"
Call PlayerSave(index)
exit sub

Thanks,
Sk8

Edit:Oh and i cant open the players .dat file so i realy dont know what the structure of it is or even if to save the players stats is even possible besides the way im doing so i plan to make my own save function and load those stats on game load :P

Edit: Oops sorry just noticed that this isnt the scripting questions section sorry if your a mod / admin please move this if its not in the right place
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...