PDA

View Full Version : Fast Help


vassilis
14/10/2011, 08:48 PM
Hey guys can u help me with this problem ;p 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|s kin=116||skin=108||skin=109||skin=110||skin=121||s kin=122|skin=173||skin=175||skin=117||skin=118||sk in=247||skin=248||skin=254||skin=111||skin=112||sk in=113||skin=124||skin=125||skin=126||skin=127||sk in=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:
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:

[MG]Dimi
14/10/2011, 08:52 PM
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

AeroBlast
14/10/2011, 08:53 PM
Could you say which line line 2159 is?

EDIT: I'm slow...

vassilis
14/10/2011, 08:53 PM
Firstly is this wrong or wright?
iif(strcmp(skin=80||skin=81) == 0) {


and 2ndly this is the 2159 line of my script :

if(strcmp(skin == 274||skin == 275||skin == 276) ==0) {

Fj0rtizFredde
14/10/2011, 08:55 PM
You don't need strcmp there just use it like this: (Since they are not strings)

if(skin == 80 || skin == 81)
{
//Code
}

And do the same with the others. :)

vassilis
14/10/2011, 08:57 PM
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 :DD i didnt notice that i have strcmp X_X
Edit:
one more thing
is this wright or wrong?
new skin;
skin=GetPlayerSkin(playerid);

[MG]Dimi
14/10/2011, 09:27 PM
Thatsright. You wont have problems with that

grand.Theft.Otto
15/10/2011, 02:42 AM
Jeez .. you can at least indent and space out your code ...