ID:144198
 
Code:
I just want to get a tab setup, which I will later use for listed obj, but I don't care about the list right now, I just want to get a blank named tab(statpanel) to be shown.
mob
usr
statpanel(Beta)

Now for some reason I get a error saying: Beta isn't allowed here. Wich I don't see why not, because the format displayed in the DM rs is "statpanel(Panel,Name,Value)", and the blue book says Name, and Value aren't needed, only the Panel is(which is the Panel's title).
Problem description:

Can someone tell me what's going on please?

not 100% sure but try
mob
usr
statpanel = "(Beta)"


OR

mob
usr
statpanel = "Beta"

In response to BR Productions
BR Productions wrote:
not 100% sure but try
mob
usr
statpanel = "(Beta)"


OR

mob
usr
statpanel = "Beta"


Thank you anyway, but nope, neither one worked sigh.
In response to Zoltor
mob
Stat()
statpanel("beta")
In response to Pakbaum
Pakbaum wrote:
> mob
> Stat()
> statpanel("beta")
>


Ah, ok thank you, that worked.

I saw that in another part of the DM rs, but they discribe it in use for setting stat vars.

PS. I really wish the Byond staff would rewrite most of the examples, and make the examples a complete concept, opposed to needing to jump to alot of places just to piece together a simple 2-3 line code.

An example,even a simple one, should display a functional code snipit.
In response to Zoltor
No problem.

The examples given though are accurate and useful, although sometimes it's just easier if someone explains it or shows you an example of what the example was supposed to be showing you >.>
In response to Pakbaum
Pakbaum wrote:
No problem.

The examples given though are accurate and useful, although sometimes it's just easier if someone explains it or shows you an example of what the example was supposed to be showing you >.>

Yea, so it would seem, hopefully when 4.0 comes out, they re'write the DM Guid,and DM rs to be more user friendly (writing complete examples, and putting subjects that are meant to be used together, on the same page, opposed to giving every single thing a diff page. Example: the Stat(),and the statpanel() should be descibed on the same paged,not two different pages,as well as haveing a propper example).

Note: I used the term subject, because I'm not reffering to just (), but anything that is meant/most commonly used together.

I would learn more,and faster by looking at Libraries,but the code I'm gonna need to write is too custom,infact what I'm making Isn't even an RPG, so as you can imagine, aside from admin,and save systems, Libraries would be pretty useless,so I'm stuck trying to learn the old fashion way lol.

Alot of DM makes sense(and I don't even know html,except for some text tags), but the way the blue book, and such are written, It's amazing anyone knows how to code, good thing we have the developer forums lol.

PS. Thank you agian, and now I'll post the first part of this in the feature section(as a suggestion) lol.

In response to Zoltor
Eh, stop complaining at the documentation. :\ It's fairly good. Sorry, but the problem isn't quite in it, but in your knowledge and searching (...or lack of them). At any case, the code at your first post here makes no sense at all and from judging it, it appears you don't know basic DM (heck, programming) principles... Hopefully it's a bit more of a one-time fluke, but there you have it.
In response to Kaioken
Kaioken wrote:
Eh, stop complaining at the documentation. :\ It's fairly good. Sorry, but the problem isn't quite in it, but in your knowledge and searching (...or lack of them). At any case, the code at your first post here makes no sense at all and from judging it, it appears you don't know basic DM (heck, programming) principles... Hopefully it's a bit more of a one-time fluke, but there you have it.

Don't be a fool, clearly I don't know DM, thats why I'm reading the DM rs, and as for your remark on the code snipit in my first post not making sense, blame Byond, Statpanel(panel,Name,,Value), is all they discribed there.

PS. But for arguemental purposses why doesn't it make sense? Statpanel(Panel) is a proc in It's self(atleast that's what it's portreyed as), and the stat()(which Byond discribes as It's usage, is for setting up actual stat vars.
In response to Zoltor
I guess I could help you get a better understanding of statpanels.
mob
var/const/max_items = 25
Stat() // that will call client.statobj
if(statpanel("Inventory")) // indenting makes it more readable
stat("total items", "[src.contents.len]/[src.max_items]")
stat(src.contents)
obj
cheese
suffix = "Rotten" // this will appear blue
mob
verb
get_cheese()
new/obj/cheese(usr) // short for contents

http://byondscape.com/ascape.dmb/Shadowdarke.2003-0322/ that should give you a even greater understanding.
In response to Xx Dark Wizard xX
Thanks, however I won't be useing it that way. I'm making a Magic the Gathering game, and I'll be using it simular to the way Kajika uses it, when you enter the deck edit screen in DMO.
In response to Zoltor
Have fun with a magic game, I have been working on mine for a while and it is really difficult. One good way to store cards is XML. I just have a Card datum and I use bitflags for abilities, it is actually very useful.
#define defender 0
#define can_attack 1
#define first_stike 2
#define trample 4
#define flying 8

Card
proc
StartBattle(mob/A, mob/B)
if((A.flags & first_stike) && (B.flags & first_stike))
attacker = pick(A,B)
if(attacker == A)
defender = B
else
defender = A
else if(A.flags & first_stike)
attacker = A
defender = B
else if(B.flags & firs_strike)
attacker = B
defender = A
// a few hundred lines of code to sort through abilities
<dm>
A MTG game is no easy thing, and I really reccomend something easier, its alot harder than a Duel Monsters game also.
In response to Xx Dark Wizard xX
Cool,looks good, good luck.

Yea lol, I know It's alot hare then a Yugioh game, that's a giving(MTG is by far a more avanced card game then yugioh is to begin with), however I may not be a master coder, but I am a master on design philosophies, infact I game up with ideas that would make this game a monster. Now aside from Kajika's Deck Editing system my MTG game is completely different in even basic desighn.

What I plan to do

Examples:

(1)Field size:There will be table icons to start a duel, however no way you could fit 50-100 cards on a table icon, so what I'm gonna do is partition the table in half. You click on your side, you open a popup of your field, where tou would then click on any cards you wish to activate. If you click on your oponants side, you will open a popup of their field(which could be used to view that players cards, or target a permant that player has on his/her field). That there solves the space issue, very easily actually.

(2)Interupt issue: Opposed to making the game auto interupt every single time a playey taps a land or oplays a card(which would be so dam annoying), I will make a interupt button, that will put the actions of your oponant on hold(allowing you to tap land,play instants,interupts or fast effects). Unlike the simple fix for the first issue,it will probally be buggy at first (which I would have to fix, before the public beta version).

(3)Byond restrictions:I came up with a system, that will allow me to bypass the Byond restrictions, allowing me to add as many cards I want(I'm not exactly sure how to code that system, but there's a 99% chance It's possible, which clearly I can't figure that out until I master the DM code, which is way far off,so I wont go into any more details.

(4)Balance issue: In r/l It's balanced because not every one has the more powerful type I cards. Most of the cards will be available from the start, It's a dueling utility, not an RPG. Now in the Deck Edit area, each player will have an extra tab, aside from the other set/card tabs. This tab is special per player, it is cards earned from tourny.Now Depending on how many people are in the tourny,and if you came in first or second, you will be rewarded points, which you could trade in for cards,or save up for the really godly cards(which the Black Lotus will take forever to beable to afford, I asure you lol)

Note: But like I siad 90% of the cards are gonna be availble from the start.

(5)Additional dueling systems: These will most likely be added in very late betas, but I want to have these= Two Headed Giant,Emperror,and a massive 70 player Chaos Multiplayer match.

PS.There's a bunch of other nice systems I'm gonna have too,but you probally have a picture of it now. I'm well aware that this will be very hard to make (on the up side, I already have pics of every MTG card made, so atleast that's out of the way),so don't thimnk I didn't put alot of thought in this,and going in blind folded lol.

Although there is a bright side to the tunnel of prepetual darkness, once the main system is up, it will be pretty easy to edit/fix minor card system bugs.
In response to Zoltor
90% of the cards is like 8k
In response to Xx Dark Wizard xX
Xx Dark Wizard xX wrote:
90% of the cards is like 8k

You misunderstood it, I should've posted it clearer. By 90%, I meant 90% of the cards in game, after the game is completed.

However if the #3 system works,then I could have all the cards in MTG,but I will not be adding all the cards,nor do I have any desire to do so.

There is no need to add useless cards, and I wont add watered down versions of old cards(like telfie's Moat,time warp,exc).

The older sets, includeing Beta will be there at the start (of the public Beta that is). Now after this, instead of adding cards by set, I will add cards by theme,this way more deck types can be made opposed to peaople needing to wait years, for certain deck types to be available, or the better cards that work with the diff themes.

In MTG, you need Beta as the corner stone, and the few sets after it you need, so you can build a few types of decks, therefore I'm gonna start off with 440 cards (215 of Beta, 180 of Legends,and 45 of Arabian Nights,). There is no point in adding banned cards like Chaos Orb,to the game, and there is no point to add the exstreamly bad cards no one would use,however I intead to add all the cards that have practical uses eventually(The first 440 cards is all the usable cards from those 3 sets).

PS. I wont be adding copies of the addition cards to the game either, so that alone means I won't be adding anywhere near 10,000 cards at the end.
In response to Zoltor
It doesn't even have to do with anything statpanel()/Stat() specific at all. You don't have a basic DM understanding and should definitely [re-]read the DM Guide and beginner tutorials before attempting to code.

What 'doesn't make sense' in that code? Let's see.
mob
usr
statpanel(Beta)


You're trying to use usr, which is a proc variable (which is mostly only safe to use in verbs), in a mob definition, not in a proc... And, uh, you're indenting code under it... o_O
What that is doing is defining a new type of /mob: /mob/usr.
You're also trying to call a proc in an object definition, but you can only do that from another proc (eg, New(), a verb, etc).
Lastly, you're trying to use text without even specifying it's a text string - there are no double quotes, which are obviously needed.
In response to Kaioken
Kaioken wrote:
It doesn't even have to do with anything statpanel()/Stat() specific at all. You don't have a basic DM understanding and should definitely [re-]read the DM Guide and beginner tutorials before attempting to code.

What 'doesn't make sense' in that code? Let's see.
> mob
> usr
> statpanel(Beta)

You're trying to use usr, which is a proc variable (which is mostly only safe to use in verbs), in a mob definition, not in a proc... And, uh, you're indenting code under it... o_O
What that is doing is defining a new type of /mob: /mob/usr.
You're also trying to call a proc in an object definition, but you can only do that from another proc (eg, New(), a verb, etc).

Lastly, you're trying to use text without even specifying it's a text string - there are no double quotes, which are obviously needed.

Well the reason I was trying to use usr is because certain tabs will be specific to the usr,such as the "Cards won from Tourny tab".

Yea ok to the rest though.
In response to Zoltor
Which still makes no sense, as 'usr' equals the player mob who started the chain of procs (of the proc it's used in); it's passed along from client procs and all verbs to any called proc. And again, it may only be used in a proc.

Also, all statpanels are always specific to each player anyway.