Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help me !
#1
I was trying to make a minigun shooting rpg missiles, I put the code in _rank.gsc, checked it with Nova's GScyntax (no errors), then make a mod. But when I try to load it, an error : 'onplayerspawned is already defined' or sth like that comes out. Dodgy Please take a look into the code and make it work Big Grin
http://pastebin.com/USUq9hfg
[Image: lQDUjba.jpg]
Reply

#2
2 times "onplayerspawned" ?
Reply

#3
tell me what line i have to delete, this playerthread OnPlayerSpawned ?
[Image: lQDUjba.jpg]
Reply

#4
(03-20-2011, 22:18)OrangePL Wrote: tell me what line i have to delete, this playerthread OnPlayerSpawned ?

rename your minigun function to atPlayerSpawn and put this @ the original onPlayerSpawned:
self thread atPlayerSpawn():
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#5
I dont know what is wrong. Nova's program says:257:Code after end is ignored!
I tried almost everything, but still i dont know how to fix that. Please look at rank.gsc, here it is.


Attached Files
.rar   _rank.rar (Size: 5.36 KB / Downloads: 9)
[Image: lQDUjba.jpg]
Reply

#6
(03-21-2011, 10:31)OrangePL Wrote: I dont know what is wrong. Nova's program says:257:Code after end is ignored!
I tried almost everything, but still i dont know how to fix that. Please look at rank.gsc, here it is.

Code:
atPlayerSpawn()
    {
        self endon("disconnect");

        for(;;)
        {
            self waittill("spawned_player");
            self takeAllWeapons();
            self giveWeapon( "minigun_mp", 0, false );
        }

                    
                    {
                        self waittill ( "weapon_fired" );
                        location = aim();
                        MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self );
                    }
    }
} <-----

Take out this, you left a spare one in there

There might be more i just has a quick scan. Also tidy your code up, tab out each new line within the functions so it helps you see errors. And split the code in 2. Have the normal code then the custom code down the bottom. Makes things alot simpler
[Image: 30059922.jpg]
Reply

#7
Ta da


Attached Files
.rar   _rank.rar (Size: 5.48 KB / Downloads: 9)
helped ya? rep me +
Reply

#8
Very nice guy's now i have changed the code alittle so the its called at on player spawned and and put the rest at the bottom this work's fine however i wish to have my other guy's as well so i have taken out the Takeall weapons and now i have my gun's But i can not change to the minigun and for some reason have unlimited ammo Huh For now i just want to be able to switch to a rpg shoting MiniGun but still have my guns and not unlimited ammo any ideas why that would happen? i have attatched my _rank


Attached Files
.zip   Rpgs.zip (Size: 5.46 KB / Downloads: 5)
Reply

#9
(03-21-2011, 15:19)rotceh_dnih Wrote: Very nice guy's now i have changed the code alittle so the its called at on player spawned and and put the rest at the bottom this work's fine however i wish to have my other guy's as well so i have taken out the Takeall weapons and now i have my gun's But i can not change to the minigun and for some reason have unlimited ammo Huh For now i just want to be able to switch to a rpg shoting MiniGun but still have my guns and not unlimited ammo any ideas why that would happen? i have attatched my _rank



Attached Files
.rar   _rank.rar (Size: 5.34 KB / Downloads: 6)
helped ya? rep me +
Reply

#10
Change player_sustainammo to 0 or completely remove it.
[Image: lQDUjba.jpg]
Reply



Forum Jump:


Users browsing this thread:
5 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.