Error on saving data -
Kindred - 22.11.2011
Was bored, decided to work around a bit. I looked at my other thread about positions, and i wanted to start creating a script. But i get an error when i try to compile it:
Код:
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(95) : error 017: undefined symbol "name"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(95) : error 017: undefined symbol "value"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(96) : error 017: undefined symbol "name"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(96) : error 017: undefined symbol "value"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(97) : error 017: undefined symbol "name"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(97) : error 017: undefined symbol "value"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(98) : error 017: undefined symbol "name"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(98) : error 017: undefined symbol "value"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(99) : error 017: undefined symbol "name"
C:\Users\Administrator\Desktop\Sa-mp Stuff\Server\gamemodes\ARP.pwn(99) : error 017: undefined symbol "value"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Errors.
pawn Код:
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
I'm a beginner at pawn, please help me if you can.
PS: I'll be back in 8 hours, so it will take a while for me to respond, so please try the best you can to help me.
Re: Error on saving data -
SmiT - 22.11.2011
Can you show under what callback you have those lines? Note, the callback should at least contain the following parameters: playerid, name[], value[] an example would be -
pawn Код:
forward @myFunc(playerid, name[], value[]);
@myFunc(playerid, name[], value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
return 1;
}
Re: Error on saving data -
JaTochNietDan - 22.11.2011
I don't think you posted the right snippet of code there, as there are no symbols named "name" or "value" used in that snippet.
Undefined symbol means that you're using a symbol (word) that isn't defined in that context, so the computer doesn't know what you're trying to do. You're likely missing some variable declarations.
I suggest you read the PAWN documentation
here, as it is the best way to learn the language.
Edit: Too slow, yet again
Re: Error on saving data -
Kindred - 22.11.2011
I understand that, but those are the EXACT lines.
EDIT: I think its resolved. i did INI_WriteInt instead of INI_Int and it compiled.