Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ty3194

#1
Quote from: geork on Sat 28/07/2012 21:53:05
As in: in some of your functions you are checking what the players active inventory is, but in some of them you are not. It's probably best to check this in all combining objects functions.

Thanks, now I understand, I made them all into player.ActiveInventory == #

Quote from: geork on Sat 28/07/2012 21:53:05
Yes, absolutely, and this is where structs can come in handy. Instead of having 30 inventory items for a single chemical, have one, and attach the amount of the chemical onto a variable. So for example, instead of:
Code: AGS
player.InventoryQuantity[iItem] += 60;
UpdateInventory();
 
have:
Code: AGS
player.AddInventory(iItem);
chems[iItem.ID].quantity += 60; // Have the chems ID match the item ID, it makes everything super simple

You can always check whether the quantity becomes 0, in which case the player should lose that inventory item.

This helps in a way but doesn't really help how I needed because you are still using "player.AddInventory(iItem);" and the game can only have a total of 300 iItems. I'm talking about a way one could avoid several items for each different stage of a reaction such as iRobo (cough syrup), iSyr_Amm (syrup and ammonia), iSyr_Amm_Nap (syrup, ammonia, and naphtha), etc...

And for that code, how would that help? Wouldn't I have to call that for every step of the extraction since it discusses mixing 2 specific chems with each other to make a 3rd? And would I still have to use it twice so that you can use both items to start the reaction as in:

Code: AGS

//USES iNH3 ON iRobo IF POSSIBLE
function iNH3_UseInv(){
if (player.ActiveInventory == iRobo){


AND

Code: AGS

//USES iRobo ON iNH3 IF POSSIBLE
function iRobo_UseInv(){
if (player.ActiveInventory == iNH3) {
#2
Quote from: Khris on Wed 25/07/2012 11:00:36
"You'd need to store possible combinations in a struct array (i.e. database table)"

Thanks for the tip.

Quote from: Khris on Wed 25/07/2012 11:00:36
"Regarding your code though: Add/LoseInventory do nothing other than in/decrease InventoryQuantity by one. So there's no need to add, then increase by 59, just add 60; and "if quantity < 1 loseinventory" is completely redundant.

At first I was using both "player.AddInventory(iItem)" and "player.InventoryQuantity[iItem] += 59" because I was having problems with the item appearing in inventory, but I later found that to be caused by a lack of "UpdateInventory()" afterwards.

And I was using "if quantity < 1 loseinventory" because without it problems would occur with using items with zero quantity, but it was later concluded to be a result of using "if (player.InventoryQuantity[iItem.ID] > 0)" instead of "if (player.ActiveInventory == iItem)" and was promptly fixed.

Quote from: Khris on Wed 25/07/2012 11:00:36
Also, while you're checking player.ActiveInventory in the first function, you stop doing it in the other ones. You need to check the quantity in addition to which item was used, not instead of.

Could you expand on this?


EDIT: I'm having trouble figuring how to incorporate my chemistry scripts into a struct array. The dynamic help is vague.. perhaps this is a start but what would it afford me:
Code: AGS
// at top of script
Chem chems[300];
// inside script function
chems[0].damage = 10;
chems[0].price = $3;
chems[0].name = "960mL Ammonia";
chems[1].damage = 20;
chems[1].price = $5;
chems[1].name = "300mL Naphtha";


Also, is there a way to use this script array to avoid creating several different inventory items during chemistry, as each game can only contain 300 items and they will surely fill fast if not.
#3
I spent several hours making this half-finished system in order to perform chemistry (albeit a novice form) but am now wondering if there is a simpler, less redundant and time-consuming method... Here is my code:

Code: AGS
// CHEMISTRY



// DXM EXTRACTION



//USES iNH3 ON iRobo IF POSSIBLE
function iNH3_UseInv(){
if (player.ActiveInventory == iRobo){ 
Display ("You basify 30mL of cough syrup with 30mL of ammonia.");
  player.InventoryQuantity[iNH3.ID] -= 30;
  player.InventoryQuantity[iRobo.ID] -= 30;
  player.AddInventory(iSyr_Amm);
  player.InventoryQuantity[iSyr_Amm.ID] += 59;
  }  
}


 //USES iRobo ON iNH3 IF POSSIBLE
function iRobo_UseInv(){
if (player.ActiveInventory == iNH3) {
Display ("You basify 30mL of cough syrup with 30mL of ammonia.");
  player.InventoryQuantity[iNH3.ID] -= 30;
  player.InventoryQuantity[iRobo.ID] -= 30;
  player.AddInventory(iSyr_Amm);
  player.InventoryQuantity[iSyr_Amm.ID] += 59;
  }  
}


// INSPECTS iRobo+iNH3 FLASK
function iSyr_Amm_Look(){
Display ("A flask filled with %dmL of ammonia and cough syrup", player.InventoryQuantity[iSyr_Amm.ID]);
}


// ADD 5mL OF iNaphtha TO FLASK OF 30mL iRobo+iNH3 IN POSSIBLE
function iNaphtha_UseInv() 
{
if (player.InventoryQuantity[iSyr_Amm.ID] > 0){
Display ("You add 5mL of naphtha to 30ml of the ammonia/syrup");
  player.InventoryQuantity[iNaphtha.ID] -= 5;
  player.InventoryQuantity[iSyr_Amm.ID] -= 30;
  player.AddInventory(iSyr_Amm_Nap);
  player.InventoryQuantity[iSyr_Amm_Nap.ID] += 34;
}
else{
  if (player.InventoryQuantity[iSyr_Amm.ID] < 1){
    player.LoseInventory (iSyr_Amm);
    }
  }
}


// ADD 5mL OF iNaphtha TO FLASK OF 30mL iRobo+iNH3 IF POSSIBLE
function iSyr_Amm_UseInv()
{
if (player.InventoryQuantity[iSyr_Amm.ID] > 0){
Display ("You add 5mL of naphtha to 30ml of the ammonia/syrup");
  player.InventoryQuantity[iNaphtha.ID] -= 5;
  player.InventoryQuantity[iSyr_Amm.ID] -= 30;
  player.AddInventory(iSyr_Amm_Nap);
  player.InventoryQuantity[iSyr_Amm_Nap.ID] += 34;
}
else{
  if (player.InventoryQuantity[iSyr_Amm.ID] < 1){
    player.LoseInventory (iSyr_Amm);
    }
  }
}


// INSPECTS iRobo+iNH3+iNaphtha FLASK
function iSyr_Amm_Nap_Look()
{
 Display ("A flask filled with an %dmL of an immiscible mixture of ammonia/ cough syrup and naphtha at 30mL:5mL", player.InventoryQuantity[iSyr_Amm_Nap.ID]);
}

#4
Thanks for the advice. I tried getting that to work and couldn't very easily. My current system works just fine though. Thanks
#5
Thanks Khris! I looked up SetGameSpeed() and realized I could add that to my vDXM variable's effects section in the globalscript, and once a certain value is reached (in this case vDXM > 5), I SetGameSpeed() to 20, which is half the normal value. This also effectively halves the rate at which times progresses -- and thus doubles the time it takes for the clock to tick -- thereby ultimately increasing the time it takes vDXM to reduce to 0 (AKA the half-life of the drug). I no longer need to use floats, this worked great! Thanks again.
#6
I'm having trouble finding a way to slow down/speed up time when using certain drugs. My game has a clock GUI binded to global scripting which uses variables to change time based on default game FPS. When the user drinks cough syrup, 1 is added to a variable vDXM2, and after some time passes to allow for onset, vDXM2's value is sent to a variable named vDXM, which will have all the drugs effects once scripted in. Here is the code:

Code: AGS

function repeatedly_execute_always() {
  

// CLOCK

if (gPause.Visible) return;

    if (IsTimerExpired(1)) {
    vDXM = vDXM2; vDXM2 = 0;
    Display("You start feeling the DXM");
    }
    

  // advance game clock
  time_loop++;
  if (time_loop == 40) { // advance game minutes
    time_loop = 0;
    time_min++;

    if (time_min == 60) { // advance game hours
      time_min = 0;
      time_hour++;
    if (vDXM > 0) {
      vDXM -= 1;
      }
      
      if (time_hour == 24) { // advance game days
        time_hour = 0;
        time_day++;
      }
    }
  }


  // update clock label
  if (time_hour < 12) {
    if (time_hour == 0)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
    else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
  }
  else lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);
  

  
  

// DRUG EFFECTS

lblDrug1.Text = String.Format ("DXM %d", vDXM);
lblDrug2.Text = String.Format ("DXM2 %d", vDXM2);

//DXM

 if (vDXM > 1) {
}
  
}  



My question is how should I go about slowing time once enough DXM has been used (say if vDXM > 1)? Should I temporarily increase framerate per second or temporarily change the clock so that 40 frames = one half or a fourth of a second versus one, and how?

Also, after an hour passes I want the drugs effects (vDXM) to decrease by a certain amount. At the moment it decreases by 1, but is there a way to decrease by a half or a fourth? When I tried using 0.5 the output window says:
QuoteGlobalScript.asc(94): Error (line 94): Type mismatch: cannot convert 'float' to 'int'
and when I tried using 1/2 my gDrugs GUI (which displays vDXM value) doesn't decrease even after waiting several minutes, meaning -= 1/2 has no effect.

Code: AGS

if (time_min == 60) { // advance game hours
      time_min = 0;
      time_hour++;
    if (vDXM > 0) {
      vDXM -= 1;
      }

Thanks in advance!
#7
that worked perfectly thanks again for your help
#8
This is my code

Code: ags

function repeatedly_execute_always() {

if (gPause.Visible) return;

    if (IsTimerExpired(1)) {
    vDXM += 1;
    Display("You start feeling the DXM");
    }
    

  // advance game clock
  time_loop++;
  if (time_loop == 40) { // advance game minutes
    time_loop = 0;
    time_min++;
    if (time_min == 60) { // advance game hours
      time_min = 0;
      time_hour++;
      if (vDXM > 0) {
      vDXM -= 1;
      }
      if (time_hour == 24) { // advance game days
        time_hour = 0;
        time_day++;
      }
    }
  }
  
lblDXM.Text = String.Format("DXM: %d", vDXM); // GUI that displays vDXM value


==================================and==================================

Code: ags


function iRobo_Talk()
{
  if (player.InventoryQuantity[iRobo.ID] == 0) { // Discards the bottle if none is left
    Display ("An empty bottle of cough syrup");
    player.LoseInventory (iRobo);
    UpdateInventory();
  }
  
  else {
    if (vDXM == 0) { // Drinks an ounce if you have it, starts timer
    Display ("You swig an ounce, and though its horrid taste does not deter you from its abuse, the resultant nausea- stymied from consuming surplus ammounts of saccharin-laden syrup within a brief time- makes you reluctant to take another.");
    player.InventoryQuantity[iRobo.ID] -= 1;
    SetTimer(1, 200); // 1200
  }
    if (vDXM > 0) { // If you are already feelin it, drinks another ounce and makes you higher/ removes an ounce 
    vDXM += 1;
    Display ("You swig another ounce.");
    player.InventoryQuantity[iRobo.ID] -= 1;
    }
  }
}



The problem is that when the timer (which simulates drug onset time) is started by the drinking of an ounce of cough syrup, and subsequent ounces are drank before said timer expires, the vDXM global variable value is only 1 after the timer expires (as if only 1 ounce was drank), though the inventory quantity depletes. How would one go about changing it so that even if multiple ounces are drank at once the effects (vDXM += 1) are not felt until after the timer expires?

#9
Thanks Khris that worked, as compared to my old code. The clockGUI is going nice and smooth, and works fine with the  pause GUI (which I bound to eKeyP:every time P is pressed the whole screen is covered with a transparent GUI with label 'pause' in center; time pauses as it should), except that time stops when something talks. This is the exact time section of my globalscript:

Code: ags

function repeatedly_execute() {
  
  // Put here anything you want to happen every game cycle, even when
  // the game is paused. This will not run when the game is blocked
  // inside a command like a blocking Walk()
  
  if (IsGamePaused() == 1) return;

  // Put here anything you want to happen every game cycle, but not
  // when the game is paused.
}

function repeatedly_execute_always() {

if (gPause.Visible) return;

  // advance game clock
  time_loop++;
  if (time_loop == 40) { // advance game minutes
    time_loop = 0;
    time_min++;
    if (time_min == 60) { // advance game hours
      time_min = 0;
      time_hour++;
      if (time_hour == 24) { // advance game days
        time_hour = 0;
        time_day++;
      }
    }
  }

  // update clock label
  if (time_hour < 12) {
    if (time_hour == 0)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
    else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
  }
  else lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);

}


Besides that, I believe this thread has fulfilled its purpose. Now all that is left for me to do is link the time_variables to the mood_variables (vSleep, vEat, vFun, etc.), which I'm supposing can be done within the globalscript here

Code: ags

time_loop++;
  if (time_loop == 40) { //
    time_loop = 0;
    time_min++;
    if (time_min == 60) { // MOOD_VARIABLES INCREASED OVER HOUR INTERVALS BY 1-10 POINTS [or even 1/2 points if possible- if not then I will do that within the above minutes interval].
      time_min = 0;
      time_hour++;
      if (time_hour == 24) { // 
        time_hour = 0;
        time_day++;


Thanks to anyone who has or will help me with this, and know that it will help other creators (whom may also possess creativity only hindered by a lack of technical knowledge) in the future.
#10

Code: ags

  if (time_hour <12){
    if (time_hour==0)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
    else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
  }
    else
  {
    lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);
  } 


[/quote]

ok so does this go under global script too? or within the gClock GUI txt part? cause I was under the influence that it was the former, but it doesnt show up even if the onscreen GUI is huge. but, I put txt in the GUI property and it shows in game
#11
Quote from: Khris on Wed 14/12/2011 01:53:51

Regarding the clock GUI, it sounds like its visibility is set to "pause game when shown". That's what you have to set the pauseGUI to, not the clock GUI though. Set it to "normal, initially on".

Actually the clock GUI, gClock, is already set to normal, initially on. The gray box appears as it should in the bottom right where I placed it. Tho, the green text doesnt appear. I think theres some  compatibility (for lack of a better word) issues between gClock and the global script for the GUI's label txt for the time_int variable's display. No numbers are showing.

Here is the code:

Code: ags

    if (time_hour <12){
    if (time_hour==12)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
    else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
    }
    else
    {
    lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);
    } 



the game starts fine and there are no errors.


and on a side note, I am now debating whether or not to forbid pausing the game as to make it more like real life, as I want it to be. You should have to find a safeplace first before you can walk away from the game. though, some people might not like having to watch out for the cops all the time in real life and in game....
#12
Khris your right, i had the text as lblClock instead of the name. that is resolved, but now to the pause thing. this is my code


function repeatedly_execute_always() {

if (gPause.Visible) return;
{
time_loop++;
if (time_loop==40) {
  time_loop=0;
  time_min++;
  if (time_min==60){
    time_min=0;
    time_hour++;
    if (time_hour==24){
      time_hour=0;
      time_day++;
      {
    if (time_hour <12){
    if (time_hour==12)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
    else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
    }
    else
    {
    lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);
    }
    }
  }
}
}
}


it gives the error GlobalScript.asc(71): Error (line 71): undefined symbol 'gPause'

pausing the game isnt my concern, its pausing the time when the game is paused that is.


also, when i run the game with the gClock GUI visible on the screen with a gray box and green txt, nothing is shown.



thanks for everyones help

#13
That is exactly how I want the time to be, 1 IRL second= 1 IG minute, etc..

this is my code now


function repeatedly_execute() {
 
  // Put here anything you want to happen every game cycle, even when
  // the game is paused. This will not run when the game is blocked
  // inside a command like a blocking Walk()
 
  if (IsGamePaused() == 1) return;

  // Put here anything you want to happen every game cycle, but not
  // when the game is paused.
}

function repeatedly_execute_always() {
 
time_loop++;
if (time_loop==40) {
  time_loop=0;
  time_min++;
  if (time_min==60){
    time_min=0;
    time_hour++;
    if (time_hour==24){
      time_hour=0;
      time_day++;
      {
    if (time_hour <12){
    if (time_hour==12)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
    else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
    }
    else
    {
    lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);
    }
    }
  }
}


my clock GUI is named gClock, with a label named lblClock, but it now says

GlobalScript.asc(83): Error (line 83): Undefined token 'lblClock'



and from 'monkey_05_06's post, I now understand the difference between the 2 functions repeatedly_execute & repeatedly_execute_always...

function repeatedly_execute()= continuously carries out a function even when the game is paused except while a blocking function is overriding

if (IsGamePaused() == 1) return;= same as above except the function is also not carried out even when paused

function repeatedly_execute_always()= continuously carries out a function, even when the game is paused and even when a blocking function is occuring


from that, could one put 'if (IsGamePaused() == 1) return' under 'function repeatedly_execute_always()' to make the function repeatedly execute during blocking functions but not during pausing? I dont want the player to pause the game and get up only to come back starving, fatigued, and on the verge of urinating
#14
this is very helpful. i got all the global variables set (with names like vSec, vMin, vHour, vDay [for OCD reasons])

also, i put the code in global script

function repeatedly_execute()
{
 
  // put anything you want to happen every game cycle, even when
  // the game is paused, here
 
  if (IsGamePaused() == 1) return;
vSec++;
if (vSec==40)
{
  vSec=0;
  vMin++;
  if (vMin==60){
    vMin=0;
    vHour++;
    if (vHour==24){
      vHour=0;
      vDay++;
    }
  }
}
  // put anything you want to happen every game cycle, but not
  // when the game is paused, here
}

now i just need to make the GUI. i right clicked GUI, made new GUI with title lblClock, but how does one make a function under repeatedly_execute, because when I click the lightening bolt it just says On_Click

EDIT: about making a function under repeatedly_execute... I now understand that you mean within globalscript, not under GUI properties. Also, to avoid any confusion I made my script exactly as you stated.

Now it says there is an undefined symbol "hour" at line 59,60

57 function repeatedly_execute()
58 {
59  if (hour <12){
60  if (hour==12)  lblClock.Text = String.Format("12:%02d a.m.", time_min);
61  else lblClock.Text = String.Format("%02d:%02d a.m.", time_hour, time_min);
62 }
63 else
64{
65  lblClock.Text = String.Format("%02d:%02d p.m.", time_hour-12, time_min);
66 }
67  // put anything you want to happen every game cycle, even when
68  // the game is paused, here

I'm assuming it is because within that code there is a variable title hour rather than time_hour. after converting each hour (at 59,60) to time_hour, the error disappears but is replaced with this error:

GlobalScript.asc(60): Error (line 60): '.Text' is not a public member of 'GUI'. Are you sure you spelt it correctly (remember, capital letters are important)?

 
#15
I have searched the forums for a thread that would help me with this, but all talk about room-based time and thus are unhelpful.

Basically, my game is going to be grand theft auto + the sims, and I want to create time within the game's global script so it is continuous throughout the entire game.

For every second = 1 minute, every minute = 1 hour and for every in-game hour I want the character's stats (need for hunger, sleep, bathroom, etc.) to change within a range of 1-10. Also, I want to make a digital clock GUI that progresses, along with the time script, from 12am (midnight) to 12pm (noon) and back to midnight.

So say the player is tired (sleep > 4) then they can sleep, which advances time 8 in-game hours and resets sleep counter to zero. but say the player stays up within game for a long time (by either sleep deprivation or use of stimulants), and sleep is 8+, then the next time they have to sleep it will last for more than 8 in game hours and leave the player groggy (sleep counter 3). Im sure the stats can be attributed to global variables easily.

Any help with this, specifically the global time scripting, would be great.
#16
Thanks.. I didn't know how people did that. It's almost completely fixed now (I removed the ; from the end of the line with an error and it worked this time. when I did that last time it said it "expected ;" but whatever), but after executing this:


Code: ags

if (vMike == 0)
    {
      Display("Mike reaches into his pocket and retrieves $50.");
      player.InventoryQuantity[iMoney.ID] += 50;
      UpdateInventory();
    }



it immediately executes this:


Code: ags

if (vMike < 1)
    {
      vMike += 1;
    }
      if (vMike == 1)
    {
      Display("Did you get the rocks?");
    }  



is there anyway to make it not execute immediatly?

this is the full code just in case you need it:



Code: ags

@1
Mike: Mike: Thanks. You can keep the change.
  {
    if (vMike == 0)
    {
      Display("Mike reaches into his pocket and retrieves $50.");
      player.InventoryQuantity[iMoney.ID] += 50;
      UpdateInventory();
    }
      if (vMike < 1)
    {
      vMike += 1;
    }
      if (vMike == 1)
    {
      Display("Did you get the rocks?");
    } 
      if (player.HasInventory(iCrack))
    {
      vMike += 1;
    }
      if (vMike == 2)
    {
Mike: Mike: You got the rocks? Nice.. hand them here chief, I'm fiendin'
    GiveScore(50);
    Display("Mission complete! You recieve 50 experience.");
    } 
  }
stop

@2
goto-dialog dMike2

#17
This post keeps messing up when I modify it.. keeps adding a code thing to the front.. have to make another post sorry
#18
Okay so now it looks like this:



@1

Mike: Mike: Thanks.
 {
   if (vMike == 0)
   {
     Display("Mike reaches into his pocket and retrieves $50.");
     player.InventoryQuantity[iMoney.ID] += 50;
     UpdateInventory();
   
Mike: Mike: Keep the change.
   }
   if (vMike == 1);
   {
     Display("Did you get the rocks?")
   }
   if (vMike < 1);
   {
     vMike += 1;
   }
 }

stop




and I get this error for line 21:



Dialog 0(21): Error (line 21): PE04: parse error at ';'



line 21 is this:

    if (vMike == 1);
#19
I now have:


@S
Mike: Mike: Hey.. hey man.
John: John: Hey bro. You okay?
Mike: Mike: Yeah yeah yeah. Kind of..
John: John: You look fucked up.
Mike: Mike: (Laughing) Was.. coming down now. Think you can do me a favor? Here's $50; take it and go buy 3 rocks from Paul, the big dude with the gray jacket, I really need it. I would, but I don't think I would make it far.
return
@1
Mike: Mike: Thanks.

if (vMike == 0)
{
  Display("Mike reaches into his pocket and retrieves $50.");
  player.InventoryQuantity[iMoney.ID] += 50;
  UpdateInventory();
}
Mike: Mike: Keep the change.
  if (vMike == 1);
    Display("Did you get the rocks?")
   
  if (vMike < 1);
    vMike += 1;
stop
@2
Mike: Mike: Damnit man. Alright.. I'll just hit up one of my friends, have them do it.
stop



But now I get these errors:

Dialog 0(11): Unknown command: if (vmike == 0). The command may require parameters which you have not supplied.
Dialog 0(12): Unknown command: {. The command may require parameters which you have not supplied.
Dialog 0(16): Unknown command: }. The command may require parameters which you have not supplied.
Dialog 0(15): Error (line 15): PE04: parse error at ';'


I basically want to make it like world of warcraft quests.. if you dont accept it at first, you can go back and accept it anytime. if you do accept it then it gives you a message the next time you go to talk to them if you havn't got the quest item/ objective complete (IE: Did you get the rocks?). And i'm going to make it so when you use the crack inventory item on him, it gives it to him and he says "thanks man." or somethng of that sort, and you get +score, which is going to be like WoW experience.
#20
I have a problem when I'm  trying to make cJohn talk to cMike. When cMike asks cJohn to buy him some crack, I want to make the dialogue give you 2 options: A.) John: Yeah man.. whatever. & B.) John: Nah bro, I'm not getting any heat on me. When you choose A.) for the first time, I want cMike to give you $50 for buying it, and then have that option never appear again (so you can't keep talking to cMike and getting $50 each time), and if you choose B.) I want it to stop the dialogue and reset it next time you start up the dialogue. Here's what I have so far:

@S
Mike: Mike: Hey.. hey man.
John: John: Hey bro. You okay?
Mike: Mike: Yeah yeah yeah. Kind of..
John: John: You look fucked up.
Mike: Mike: (Laughing) Was.. coming down now. Think you can do me a favor? Here's $50; take it and go buy 3 rocks from Paul, the big dude with the gray jacket, I really need it. I would, but I don't think I would make it far.
return
@1
Mike: Mike: Thanks.

if (vMike == 0)
  Display("Mike reaches into his pocket and retrieves $50.");
  player.InventoryQuantity[iMoney.ID] += 50;
  UpdateInventory();
Mike: Mike: Keep the change.
  if (vMike == 1);
    Display("Did you get the rocks?")
   
  if (vMike < 1);
    vMike += 1;
   
stop
@2
Mike: Mike: Damnit man. Alright.. I'll just hit up one of my friends, have them do it.
stop


But it says

Dialog 0(11): Unknown command: if (vmike == 0). The command may require parameters which you have not supplied.
Dialog 0(15): Error (line 15): PE04: parse error at ';'

line 15 is

  if (vMike == 1);



PS: In case you were wondering, my dialogue I have it so it says the person's name in front of their dialogue I.E:

Mike: Mike: Hey.. hey man.
SMF spam blocked by CleanTalk