Weapon Loading
#1

Our weapon saving system works; However when the player relogs, the weapons don't load; I have checked the script and found its not giving them back their weapons; So I came about trying to fix;
This is what i have;

pawn Код:
PlayerInfo[playerid][pWeapon][0] = dini_Int(file, "wSlot0");
    PlayerInfo[playerid][pWeaponAmmo][0] = dini_Int(file, "wSlot0Ammo");

// Me Trying To Fix ((Error Line - 1742))

    GiveZaiatWeapon(playerid, pWeapon[0], pWeaponAmmo[0]);
pawn Код:
C:\Users\~\Desktop\BCRP29R641.pwn(1724) : error 028: invalid subscript (not an array or too many subscripts): "pWeapon"
C:\Users\~\Desktop\BCRP29R641.pwn(1724) : warning 215: expression has no effect
C:\Users\~\Desktop\BCRP29R641.pwn(1724) : error 001: expected token: ";", but found "]"
C:\Users\~\Desktop\BCRP29R641.pwn(1724) : error 029: invalid expression, assumed zero
C:\Users\~\Desktop\BCRP29R641.pwn(1724) : fatal error 107: too many error messages on one line

Any Ideas? If you need to see any more just yell :O
Reply
#2

If you're loading the data into one array, you should use that array to give them the weapon! This isn't the case in your code.
Reply
#3

Erm... I have no Idea what you mean by that? Erm... Im a newbie :3 Erm...
Reply
#4

You load the data into this array:
pawn Код:
PlayerInfo[playerid][pWeapon][0] = dini_Int(file, "wSlot0");
So, doesn't it make sense that you should give the player the weapon based off the information loaded (which is in that array)?
pawn Код:
GiveZaiatWeapon(playerid, PlayerInfo[playerid][pWeapon][0], PlayerInfo[playerid][pWeaponAmmo][0]);
Reply
#5

Quote:
Originally Posted by Grim_
Посмотреть сообщение
You load the data into this array:
pawn Код:
PlayerInfo[playerid][pWeapon][0] = dini_Int(file, "wSlot0");
So, doesn't it make sense that you should give the player the weapon based off the information loaded (which is in that array)?
pawn Код:
GiveZaiatWeapon(playerid, PlayerInfo[playerid][pWeapon][0], PlayerInfo[playerid][pWeaponAmmo][0]);
Ty. I will try and get back to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)