Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 03:15:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Code Fragment issue - War3_RestrictWeaponTo  (Read 409 times)
Necavi
Full Member
***
Posts: 223


View Profile
« on: September 30, 2010, 04:55:11 PM »

For some reason this code fragment keeps popping up the error,
Code:
C:\Program Files (x86)\PawnStudio\temp507.sp(64) : error 035: argument type mismatch (argument 4)
C:\Program Files (x86)\PawnStudio\temp507.sp(64) : warning 215: expression has no effect
C:\Program Files (x86)\PawnStudio\temp507.sp(64) : error 001: expected token: ";", but found ")"
C:\Program Files (x86)\PawnStudio\temp507.sp(64) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\PawnStudio\temp507.sp(64) : fatal error 127: too many error messages on one line

Compilation aborted.
4 Errors.
This is the fragment:
Code:
        if(IsPlayerAlive(client))
        {
            War3_WeaponRestrictTo(client,thisRaceID,"weapon_awp","weapon_knife","weapon_scout",priority=1);
            OnWar3EventSpawn(client);
            new skill_speed=War3_GetSkillLevel(client,thisRaceID,SKILL_SPEED);
            if(skill_speed)
            {
                // Speed and Health
                new hpadd=AWPHealth[skill_speed];
                SetEntityHealth(client,GetClientHealth(client)+hpadd);
                new Float:speed=AWPSPEED[skill_speed];
                War3_SetBuff(client,fSlow,thisRaceID,speed);
            }
        }
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #1 on: September 30, 2010, 04:55:59 PM »

"weapon_awp,weapon_knife,weapon_scout"
Logged

DarkEnergy
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #2 on: September 30, 2010, 04:59:21 PM »

Still gives errors, and I also realized that I likely shouldn't have the priority = 1 part, I just changed it to 1, but it gives errors either way, unfortunately.
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #3 on: September 30, 2010, 05:00:03 PM »

remove ,priority=1
Logged

DarkEnergy
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #4 on: September 30, 2010, 05:06:21 PM »

Heh, I figured it out
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!