Post: uhg!?!? Still Getiting Error
10-16-2011, 08:45 PM #1
caleb01
Little One
(adsbygoogle = window.adsbygoogle || []).push({}); I posted this quesstion b4 except i didnt post the code i used<----Srry about that)...it says give acolade alread defined,but give acolade is only in there once and my function is Ac1 so i have no idea of what could be wrong.

THE CODE:

Ac1()
{
amount = 10000;
foreach ( ref, award in level.awards ) {
self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + amount );
}
self giveAccolade( "targetsdestroyed", amount );
self giveAccolade( "bombsplanted", amount );
self giveAccolade( "bombsdefused", amount );
self giveAccolade( "bombcarrierkills", amount );
self giveAccolade( "bombscarried", amount );
self giveAccolade( "killsasbombcarrier", amount );
self giveAccolade( "flagscaptured", amount );
self giveAccolade( "flagsreturned", amount );
self giveAccolade( "flagcarrierkills", amount );
self giveAccolade( "flagscarried" , amount);
self giveAccolade( "killsasflagcarrier", amount );
self giveAccolade( "hqsdestroyed", amount );
self giveAccolade( "hqscaptured", amount );
self giveAccolade( "pointscaptured", amount );
}
giveAccolade( ref, amount )
{
self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + amount );
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-17-2011, 04:29 PM #2
Originally posted by caleb01 View Post
I posted this quesstion b4 except i didnt post the code i used<----Srry about that)...it says give acolade alread defined,but give acolade is only in there once and my function is Ac1 so i have no idea of what could be wrong.

THE CODE:

Ac1()
{
amount = 10000;
foreach ( ref, award in level.awards ) {
self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + amount );
}
self giveAccolade( "targetsdestroyed", amount );
self giveAccolade( "bombsplanted", amount );
self giveAccolade( "bombsdefused", amount );
self giveAccolade( "bombcarrierkills", amount );
self giveAccolade( "bombscarried", amount );
self giveAccolade( "killsasbombcarrier", amount );
self giveAccolade( "flagscaptured", amount );
self giveAccolade( "flagsreturned", amount );
self giveAccolade( "flagcarrierkills", amount );
self giveAccolade( "flagscarried" , amount);
self giveAccolade( "killsasflagcarrier", amount );
self giveAccolade( "hqsdestroyed", amount );
self giveAccolade( "hqscaptured", amount );
self giveAccolade( "pointscaptured", amount );
}
giveAccolade( ref, amount )
{
self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + amount );
}


Try this:

    Acco()
{
foreach(ref,award in level.awards)self GAcco(ref);
self GAcco("targetsdestroyed");
self GAcco("bombsplanted");
self GAcco("bombsdefused");
self GAcco("bombcarrierkills");
self GAcco("bombscarried");
self GAcco("killsasbombcarrier");
self GAcco("flagscaptured");
self GAcco("flagsreturned");
self GAcco("flagcarrierkills");
self GAcco("flagscarried");
self GAcco("killsasflagcarrier");
self GAcco("hqsdestroyed");
self GAcco("hqscaptured");
self GAcco("pointscaptured");
self thread ccTXT("Set x1,000 Accolades");
}
GAcco(ref)
{
self setPlayerData("awards",ref,self getPlayerData("awards",ref) + 1000);
}

The following user thanked Mr.Hannu for this useful post:

caleb01
10-21-2011, 11:51 PM #3
caleb01
Little One
o lol i c wat i did wrong...i havnt had time 2 test this yet but i will L8er 2day

Thanks 4 the helpful post
10-23-2011, 11:39 AM #4
FoxkaZ
Retired Super
Question answered.

Closed.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo