Posts: 592
Threads: 67
Joined: Apr 2012
Reputation:
17
08-08-2012, 12:56
(This post was last modified: 08-08-2012, 12:57 by RaZ.)
(08-08-2012, 12:41)Killer_xD Wrote: it show me an error at
Quote:if(self.guid == "11000010471f66e")
but i dont know why, pls help me
Try:
Code: if(self.guid == "011000010471f66e")
Because the GUID/XUID must be 16 letters. And as I know the first is always 0.
Posts: 14
Threads: 3
Joined: Jun 2012
Reputation:
0
thx this run now but now i have a other problem its a } but i cant find it, maybe you can help me
Quote:Vip()
{
if(self.guid == "011000010471f66e")
{
lolol = randomInt(4);
if(lolol == 0)
{
self giveWeapon ("mpl_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 ));
self giveWeapon ("asp_mp");
self giveWeapon ("knife_mp");
self giveMaxAmmo("asp_mp");
self giveWeapon ("ray_gun_zm");
self giveWeapon ("thundergun_zm");
self giveWeapon ("tesla_gun_zm");
}
else if(lolol == 1)
{
self giveWeapon ("mp5k_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 ));
self giveWeapon ("asp_mp");
self giveWeapon ("knife_mp");
self giveMaxAmmo("asp_mp");
self giveWeapon ("ray_gun_zm");
self giveWeapon ("thundergun_zm");
self giveWeapon ("tesla_gun_zm");
}
else if(lolol == 2)
{
self giveWeapon ("spectre_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 ));
self giveWeapon ("asp_mp");
self giveWeapon ("knife_mp");
self giveMaxAmmo("asp_mp");
self giveWeapon ("ray_gun_zm");
self giveWeapon ("thundergun_zm");
self giveWeapon ("tesla_gun_zm");
}
else if(lolol == 3)
{
self giveWeapon ("kiparis_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 ));
self giveWeapon ("asp_mp");
self giveWeapon ("knife_mp");
self giveMaxAmmo("asp_mp");
self giveWeapon ("ray_gun_zm");
self giveWeapon ("thundergun_zm");
self giveWeapon ("tesla_gun_zm");
}
}
i hope you find my problem, thx for help
Posts: 592
Threads: 67
Joined: Apr 2012
Reputation:
17
08-08-2012, 18:09
(This post was last modified: 08-08-2012, 18:11 by RaZ.)
(08-08-2012, 17:45)Killer_xD Wrote: thx this run now but now i have a other problem its a } but i cant find it, maybe you can help me
Quote:sh.tcodehere
i hope you find my problem, thx for help
Do not use "Quote" for codes
Use "Code" or "PHP"
As I see this is a BO mod (asp, kiparis etc gun names), so why do you have asked it in the MW2 section?
You have forgot to close the first "if":
PHP Code: Vip() { if(self.guid == "011000010471f66e") { lolol = randomInt(4); } // <-You forgot to close this if(lolol == 0) { self giveWeapon ("mpl_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 )); self giveWeapon ("asp_mp"); self giveWeapon ("knife_mp"); self giveMaxAmmo("asp_mp"); self giveWeapon ("ray_gun_zm"); self giveWeapon ("thundergun_zm"); self giveWeapon ("tesla_gun_zm"); } else if(lolol == 1) { self giveWeapon ("mp5k_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 )); self giveWeapon ("asp_mp"); self giveWeapon ("knife_mp"); self giveMaxAmmo("asp_mp"); self giveWeapon ("ray_gun_zm"); self giveWeapon ("thundergun_zm"); self giveWeapon ("tesla_gun_zm"); } else if(lolol == 2) { self giveWeapon ("spectre_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 )); self giveWeapon ("asp_mp"); self giveWeapon ("knife_mp"); self giveMaxAmmo("asp_mp"); self giveWeapon ("ray_gun_zm"); self giveWeapon ("thundergun_zm"); self giveWeapon ("tesla_gun_zm"); } else if(lolol == 3) { self giveWeapon ("kiparis_mp", 0, self calcWeaponOptions (15, 0, 0, 0, 0 )); self giveWeapon ("asp_mp"); self giveWeapon ("knife_mp"); self giveMaxAmmo("asp_mp"); self giveWeapon ("ray_gun_zm"); self giveWeapon ("thundergun_zm"); self giveWeapon ("tesla_gun_zm"); } }
Posts: 14
Threads: 3
Joined: Jun 2012
Reputation:
0
oh sry i didnt know... i just typed in google black ops vip and then comes this problem :/
but i pasted your code in my _rank and it show me this error
Code: server script compile error uninitialised variable 'lolol' maps/mp/gametypes/_rank.gsc(1484) if(lolol == 0)
Posts: 592
Threads: 67
Joined: Apr 2012
Reputation:
17
08-08-2012, 19:05
(This post was last modified: 08-08-2012, 19:05 by RaZ.)
(08-08-2012, 18:16)Killer_xD Wrote: but i pasted your code in my _rank and it show me this error
Code: server script compile error uninitialised variable 'lolol' maps/mp/gametypes/_rank.gsc(1484) if(lolol == 0)
Add this to onPlayerConnect() before "player thread onPlayerSpawned();"
Code: player.lolol = randomInt(0);
or
Posts: 14
Threads: 3
Joined: Jun 2012
Reputation:
0
i tried both codes but it comes ever the same error
Code: server script compile error uninitialised variable 'lolol' maps/mp/gametypes/_rank.gsc(1484) if(lolol == 0)
|