SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/11/2019, 10:27 PM   #1
davide1999
Little Clucker
 
Join Date: Nov 2019
Posts: 20
Reputation: 0
Default Help savings

#define PATHa "Gangpoints/%s.ini"
enum gInfo
{
gGP1,
gGP2,
gGP3
}
new GangInfo[gInfo];
forward Loadgp_data(value[]);
public Loadgp_data(value[])
{
INI_Int("gang1gp",GangInfo[gGP1]);
INI_Int("gang2gp",GangInfo[gGP2]);
INI_Int("gang3gp",GangInfo[gGP3]);
return 1;
}

Can someone help me for save this things into scriptfile folder into a text file called "Gangpoints".
I have just this codes bcs i was tryng to make my own save/load system but im beginner and i got this 3 errors:
error 017: undefined symbol "name"
error 017: undefined symbol "name"
error 017: undefined symbol "name"

On this lines:
INI_Int("gang1gp",GangInfo[gGP1]);
INI_Int("gang2gp",GangInfo[gGP2]);
INI_Int("gang3gp",GangInfo[gGP3]);

Can someone help me for finish this save/load system if someone can finish it for me bcs i will make sure others errors Thx for everyone will try help!
davide1999 is offline   Reply With Quote
Old 12/11/2019, 04:59 AM   #2
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: Netherlands
Posts: 1,859
Reputation: 1571
Default Re: Help savings

Is there any other code? From what I see here, there's nothing that uses the 'name' variable. What this error means, is that you are trying to use the 'name' variable, but it doesn't exist.
Here's a few examples on how you create variables:

Code:
new integerVariable = 5; //Type int
new Float:floatVariable 3.3; //Type float
new playerName[MAX_PLAYER_NAME]; //Type string
new message[128]; //Type string
new Query[256]; //Type string
And here's an example on how you would trigger this error:
Code:
stock TriggerCompileError(playerid)
{
	SetVehiclePos(vehicleid, 0, 0, 0);
}
In the code above, we use the 'vehicleid' variable but we haven't created it. The correct code for that example would be:
Code:
stock TriggerCompileError(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	SetVehiclePos(vehicleid, 0, 0, 0);
}
These are just some examples. If you can find the code that is using the undefined 'name' variable, we can determine which size would be best for it (assuming that it is a string)
Jstylezzz is offline   Reply With Quote
Old 12/11/2019, 09:41 AM   #3
davide1999
Little Clucker
 
Join Date: Nov 2019
Posts: 20
Reputation: 0
Default Re: Help savings

Quote:
Originally Posted by Jstylezzz View Post
Is there any other code? From what I see here, there's nothing that uses the 'name' variable. What this error means, is that you are trying to use the 'name' variable, but it doesn't exist.
Here's a few examples on how you create variables:

Code:
new integerVariable = 5; //Type int
new Float:floatVariable 3.3; //Type float
new playerName[MAX_PLAYER_NAME]; //Type string
new message[128]; //Type string
new Query[256]; //Type string
And here's an example on how you would trigger this error:
Code:
stock TriggerCompileError(playerid)
{
	SetVehiclePos(vehicleid, 0, 0, 0);
}
In the code above, we use the 'vehicleid' variable but we haven't created it. The correct code for that example would be:
Code:
stock TriggerCompileError(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	SetVehiclePos(vehicleid, 0, 0, 0);
}
These are just some examples. If you can find the code that is using the undefined 'name' variable, we can determine which size would be best for it (assuming that it is a string)
I solved errors
new GangInfo[gInfo];
forward Loadgp_data(name[],value[]);
public Loadgp_data(name[],value[])
{
INI_Int("gang1gp",GangInfo[gGP1]);
INI_Int("gang2gp",GangInfo[gGP2]);
INI_Int("gang3gp",GangInfo[gGP3]);
return 1;
}
But idk if this will save i need to put others codes if someonoe can help me to finish it
davide1999 is offline   Reply With Quote
Old 12/11/2019, 10:32 AM   #4
davide1999
Little Clucker
 
Join Date: Nov 2019
Posts: 20
Reputation: 0
Default Re: Help savings

Pls someone help me to finish it https://pastebin.com/w2hSid1r
davide1999 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Dynamic Moneybag System[With Savings] ThatFag Filterscripts 13 31/01/2017 06:27 PM
[Include] QueryBuilder.inc - Easy MySQL Savings/Loadings Maxips2 Includes 20 14/07/2014 01:05 PM
Best file system to make dynamic savings? Trenico Scripting Help 1 19/01/2013 03:34 PM
Vehicle colors savings Alvin007 Help Archive 2 11/08/2011 09:27 PM
[SOLVED] (Savings) park4bmx Help Archive 15 28/05/2010 06:53 AM


All times are GMT. The time now is 10:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.