Poll

What kind of radar would you like?

Cordinate Pinpoint map (X,Y,Z)
Tracker (X,Y,Z w/ eye vector)
Multi-Map (X,Y,Z; Eye Vector, and Waypoints)

Author Topic: Army RP Organization Mod - To make Army RPs and Military RPs less stuffty!  (Read 7732 times)

can i beta test i love military rps

Hey guys, quit asking to beta this. Everyone will get to be able to use the GUI. K THX!

Bump. I'll work more on the rank system.

ADD:

I came across a problem.

The ranks system will be modeled after the U.S. Army System for now. Later I will add Marines and that.

ADD2:

Code: [Select]
Executing add-ons/Class_Work/Gamemode_ArmyRP.cs.
add-ons/Class_Work/Gamemode_ArmyRP.cs Line: 3 - Syntax error.
>>> Some error context, with ## on sides of error halt:
/Ranks



function servercmdsetrank(%client, %targetEntry, %rank::entry);##
##
{

    if(!%client.isAdmin)

    {

    messageclient(%client,'', "You cannot set ranks");

    return;

    }

    %target = findClientByBL_ID(%targetEntry);

    if(!isObject(%target))  //a BL_ID wasn't entered, so we'll check for a name

    {

        %target = findClientByName(%targetEntry);
>>> Error report complete.


WHAT THE FUA!
« Last Edit: August 10, 2011, 05:38:48 PM by PVC Potato Gun »


Triple Post...

What the forget is wrong with this? I see no error in it what so ever, yet it says there is an error...

Code: [Select]
Executing add-ons/class_work/Gamemode_ArmyRP.cs.
add-ons/class_work/Gamemode_ArmyRP.cs Line: 22 - Syntax error.
>>> Some error context, with ## on sides of error halt:
        %target = findClientByName(%targetEntry);

        if(!isObject(%target)) //a name wasn't entered either, so we'll stop the function

        {

            return;

        }

    }

    switch$(%rank::entry)

    {

        case "Private"

            messageclient(##%##target,'',SPC "rank has been set to" SPC %rank::entry);

            %target.rank = %rank::entry;

            echo(%rank::entry);



        case "Private 2"

            messageclient(%target,'',SPC "rank has been set to" SPC %rank::entry);

            %target.rank = %rank::entry;
>>> Error report complete.

you need colons after each case, e.g.:

Code: [Select]
case "Private":

you need colons after each case, e.g.:

Code: [Select]
case "Private":

And here I though it wasn't the case, since I hat to remove semi-colons.

Code: [Select]
Executing add-ons/class_work/Gamemode_ArmyRP.cs.
add-ons/class_work/Gamemode_ArmyRP.cs Line: 22 - Syntax error.
>>> Some error context, with ## on sides of error halt:
        %target = findClientByName(%targetEntry);

        if(!isObject(%target)) //a name wasn't entered either, so we'll stop the function

        {

            return;

        }

    }

    switch$(%rank::entry)

    {

        case "Private":

            messageclient(%target,'',SPC ##"##rank has been set to" SPC %rank::entry);

            %target.rank = %rank::entry;

            echo(%rank::entry);



        case "Private 2":

            messageclient(%target,'',SPC "rank has been set to" SPC %rank::entry);

            %target.rank = %rank::entry;
>>> Error report complete.code]
« Last Edit: August 12, 2011, 04:05:02 PM by PVC Potato Gun »

You can't start or end a string with a concatenation operator (@ SPC TAB NL)

Syntax errors gone, but now my script keeps using the default case...

Progress, everything is working, except it does not show the target's name. I'll need to find a way to fix it. But, other than that this is working fine.