Not Giving Saved Weapons
#1

Basically in my saving system for weapons and such the weapons are saving just fine; however when I return IG to get them I cannot, they are simply not loading, here is the code that I have under OnPlayerSpawn:

Код:
GivePlayerWeapon(playerid, Player[playerid][Weapon1], Player[playerid][Ammo1]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon2], Player[playerid][Ammo2]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon3], Player[playerid][Ammo3]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon4], Player[playerid][Ammo4]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon5], Player[playerid][Ammo5]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon6], Player[playerid][Ammo6]);
	GivePlayerWeapon(playerid, Player[playerid][Weapon7], Player[playerid][Ammo7]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon8], Player[playerid][Ammo8]);
	GivePlayerWeapon(playerid, Player[playerid][Weapon9], Player[playerid][Ammo9]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon10], Player[playerid][Ammo10]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon11], Player[playerid][Ammo11]);
    GivePlayerWeapon(playerid, Player[playerid][Weapon12], Player[playerid][Ammo12]);
I am truly stumped, especially being I know it is saving properly!
Reply
#2

When you disconnect have you viewed your account that it says: WeaponX = WeaponID | AmmoX = Ammo ?
Reply
#3

Quote:
Originally Posted by Infinity90
Посмотреть сообщение
When you disconnect have you viewed your account that it says: WeaponX = WeaponID | AmmoX = Ammo ?
Yes, I have. That is how I know that it is saving properly and that it is merely the loading portion.
Reply
#4

Where is this code located (Under what callback ?)
Reply
#5

Quote:
Originally Posted by Infinity90
Посмотреть сообщение
Where is this code located (Under what callback ?)
For giving the weapons I have it under the OnPlayerSpawn callback.
Reply
#6

The code above looks fine, try putting it at the top of OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
//here
Maybe something is obstructing it to move on (skipping parts)
Reply
#7

Quote:
Originally Posted by Infinity90
Посмотреть сообщение
The code above looks fine, try putting it at the top of OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
//here
Maybe something is obstructing it to move on (skipping parts)
It's on the top as is. :/
Reply
#8

I guess you can post your enum for the Weapon1 etc
Other then that I don't know. :/
Reply
#9

I have narrowed down the situation, the situation being that the weapons are not being loaded properly.

I know this being I had made a Print command for if a weapon was found, to find it was not found within the system, even though the save file is saying it was. I am most likely missing a line within the saving system in order for it to load the stats the are on that line into the enumeration.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)