SA-MP Forums Archive
Fast Help - 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)
+--- Thread: Fast Help (/showthread.php?tid=290209)



Fast Help - vassilis - 14.10.2011

Hey guys can u help me with this problem ;p
pawn Код:
new skin;
skin=GetPlayerSkin(playerid);
if(strcmp(skin == 274||skin == 275||skin == 276) ==0) {
SetPlayerPos(playerid,1179.5946,-1323.0275,14.1772);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 23,100);
GivePlayerWeapon(playerid, 27,450);
GivePlayerWeapon(playerid, 30,500);
GivePlayerWeapon(playerid, 18,500);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerTeam(playerid, TEAM_MEDIC);
}
if(strcmp(skin=80||skin=81) == 0) {
SetPlayerPos(playerid, 2141.4111,-1822.7399,18.8690);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,22,500);
GivePlayerWeapon(playerid,33,40);
GivePlayerWeapon(playerid,31,900);
GivePlayerWeapon(playerid,29,500);
SetPlayerTeam(playerid, TEAM_BOXERS);
}
if(strcmp(skin=77|skin=78||skin=79||skin=213||skin=234||skin=200||skin=212||skin=158||skin=159||skin=160) ==0) {
SetPlayerPos(playerid, ghobospawn);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24,200);
GivePlayerWeapon(playerid, 26,500);
GivePlayerWeapon(playerid, 32,500);
GivePlayerWeapon(playerid, 30,500);
SetPlayerTeam(playerid, TEAM_HOBOS);
}
if(strcmp(skin=9||skin=12||skin=20||skin=27||skin=40||skin=46||skin=59||skin=98||skin=141||skin=147||skin=186||skin=187) ==0) {
SetPlayerPos(playerid,1960.0389,-1198.6134,27.1859);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,30,500);
GivePlayerWeapon(playerid,28,800);
GivePlayerWeapon(playerid,25,70);
GivePlayerWeapon(playerid,24,500);
SetPlayerTeam(playerid, TEAM_RICHFAGS);
}
if(strcmp(skin=105||skin=107||skin=114||skin=115|skin=116||skin=108||skin=109||skin=110||skin=121||skin=122|skin=173||skin=175||skin=117||skin=118||skin=247||skin=248||skin=254||skin=111||skin=112||skin=113||skin=124||skin=125||skin=126||skin=127||skin=0) ==0) {
SetPlayerPos(playerid, terroristspawn);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,16,15);
GivePlayerWeapon(playerid,30,500);
GivePlayerWeapon(playerid,29,400);
GivePlayerWeapon(playerid,27,500);
SetPlayerTeam(playerid, TEAM_TERRORISTS);
}
errors:
pawn Код:
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(1034) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2148) : error 035: argument type mismatch (argument 1)
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : warning 211: possibly unintended assignment
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : warning 211: possibly unintended assignment
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : error 022: must be lvalue (non-constant)
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : warning 215: expression has no effect
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : error 001: expected token: ";", but found ")"
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : error 029: invalid expression, assumed zero
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm2.pwn(2159) : fatal error 107: too many error messages on one line
can you help me please what are the problems D:


Re: Fast Help - [MG]Dimi - 14.10.2011

Show us exacly lines on which errors are. I see you have errors on lines 1034,2148... which is 1000 lines between which means we cant see some lines


Re: Fast Help - AeroBlast - 14.10.2011

Could you say which line line 2159 is?

EDIT: I'm slow...


Re: Fast Help - vassilis - 14.10.2011

Firstly is this wrong or wright?
pawn Код:
iif(strcmp(skin=80||skin=81) == 0) {
and 2ndly this is the 2159 line of my script :
pawn Код:
if(strcmp(skin == 274||skin == 275||skin == 276) ==0) {



Re: Fast Help - Fj0rtizFredde - 14.10.2011

You don't need strcmp there just use it like this: (Since they are not strings)
pawn Код:
if(skin == 80 || skin == 81)
{
    //Code
}
And do the same with the others.


Re: Fast Help - vassilis - 14.10.2011

oh shit i just realised i used strcmp -.-" ffs sorry its 00:00 here in my country and i am a little sleepy ;p thx man D i didnt notice that i have strcmp X_X
Edit:
one more thing
is this wright or wrong?
pawn Код:
new skin;
skin=GetPlayerSkin(playerid);



Re: Fast Help - [MG]Dimi - 14.10.2011

Thatsright. You wont have problems with that


Re: Fast Help - grand.Theft.Otto - 15.10.2011

Jeez .. you can at least indent and space out your code ...