AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cs_set_user_armor / cs_get_user_armor (https://forums.alliedmods.net/showthread.php?t=28274)

Cheap_Suit 05-11-2006 08:46

cs_set_user_armor / cs_get_user_armor
 
Code:
    new CsArmorType:ArmorType new iArmor = cs_get_user_armor(id, ArmorType) cs_set_user_armor(id, iArmor + value, ArmorType)

I get a loose indentation. Anyone know why?

Xanimos 05-11-2006 09:24

Code around it?

Cheap_Suit 05-11-2006 15:55

Code:
add_armor(id, value) {   new CsArmorType:ArmorType   new iArmor = cs_get_user_armor(id, ArmorType)   cs_set_user_armor(id, iArmor + value, ArmorType) }

Code:
public test(id) {   cs_set_user_armor(id, 100, CS_ARMOR_KEVLAR)   add_armor(id, 100) }

Zenith77 05-11-2006 16:05

Code:
cs_set_user_armor(id, (iArmor + value), ArmorType)

Try that?

Cheap_Suit 05-11-2006 16:07

Didnt help.

The warning starts at
Code:
new iArmor = cs_get_user_armor(id, ArmorType)

SweatyBanana 05-11-2006 16:09

Code:
#include <cstrike> public add_armor(id, value) {   new CsArmorType:ArmorType   new iArmor = cs_get_user_armor(id, ArmorType)   cs_set_user_armor(id, iArmor + value, ArmorType) }

Compiles fine m8...

Cheap_Suit 05-11-2006 16:16

Thats really wierd. I must have a buggy complier, ill try downloading amxx again.

SweatyBanana 05-11-2006 16:19

FYI...use the webcompiler.


All times are GMT -4. The time now is 05:05.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.