Brief help here please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Brief help here please (
/showthread.php?tid=264056)
Brief help here please -
Andregood - 24.06.2011
Well I got a little problem here with a snippet of mine
Код:
if(PlayerInfo[targetid][pMale] == 1) { sex = "Male"; }
else if(PlayerInfo[targetid][pFemale] == 1) { sex = "Female"; }
It gives me these errors
Код:
D:\SAMP Server\gamemodes\Vampires.pwn(841) : error 017: undefined symbol "sex"
D:\SAMP Server\gamemodes\Vampires.pwn(841) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\Vampires.pwn(842) : error 017: undefined symbol "sex"
D:\SAMP Server\gamemodes\Vampires.pwn(842) : warning 215: expression has no effect
Re: Brief help here please -
=WoR=Varth - 24.06.2011
pawn Код:
enum blahblahblah
{
Sex,
}
if(PlayerInfo[targetid][pMale] == 1) { PlayerInfo[targetid][Sex] = "Male"; }
else if(PlayerInfo[targetid][pFemale] == 1) { PlayerInfo[targetid][Sex] = "Female"; }
Re: Brief help here please -
Andregood - 24.06.2011
Gave me errors as well. Even more to be honest.
Код:
D:\SAMP Server\gamemodes\Vampires.pwn(842) : error 022: must be lvalue (non-constant)
D:\SAMP Server\gamemodes\Vampires.pwn(842) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\Vampires.pwn(843) : error 022: must be lvalue (non-constant)
D:\SAMP Server\gamemodes\Vampires.pwn(843) : warning 215: expression has no effect
D:\SAMP Server\gamemodes\Vampires.pwn(844) : warning 219: local variable "atext" shadows a variable at a preceding level
D:\SAMP Server\gamemodes\Vampires.pwn(844) : warning 204: symbol is assigned a value that is never used: "atext"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: Brief help here please -
Andregood - 24.06.2011
Could someone please help me, I would appreciate it!
Re: Brief help here please -
=WoR=Varth - 24.06.2011
pawn Код:
enum blahblahblah
{
Sex[8],
}
if(PlayerInfo[targetid][pMale] == 1) { PlayerInfo[targetid][Sex] = "Male"; }
else if(PlayerInfo[targetid][pFemale] == 1) { PlayerInfo[targetid][Sex] = "Female"; }
I forgot to put the length.
Re: Brief help here please -
dr.pepper - 24.06.2011
pawn Код:
new pFemale[MAX_PLAYERS];
examples ^
EDIT: Oops, sorry I didn't read above. I'll fix as soon as I come back, pm me through forums later.
Re: Brief help here please -
Andregood - 24.06.2011
This is quite strange I still seem to get 2 errors, which are:
Код:
D:\SAMP Server\gamemodes\Vampires.pwn(93) : error 010: invalid function or declaration
D:\SAMP Server\gamemodes\Vampires.pwn(94) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
It was a long time I dealt with these things, help is still kinda needed, sorry for being such a burden ;/
Re: Brief help here please -
dr.pepper - 24.06.2011
- Removed
Re: Brief help here please -
=WoR=Varth - 24.06.2011
Have you add this?
pawn Код:
PlayerInfo[MAX_PLAYERS] [blahblahblah]
All of them should be like this:
pawn Код:
enum blahblahblah //On top of your script
{
pMale,
Sex[8],
pFemale,
}
new PlayerInfo[MAX_PLAYERS] [blahblahblah];
if(PlayerInfo[targetid][pMale] == 1) { PlayerInfo[targetid][Sex] = "Male"; }//Somewhere you want it
else if(PlayerInfo[targetid][pFemale] == 1) { PlayerInfo[targetid][Sex] = "Female"; }
EDITED again
Re: Brief help here please -
Andregood - 24.06.2011
Yes I have.