Forumchem - Forum with AI(ALICE BOT & HAL9000) and TTS

More dificult for us, more easy for you
It is currently Tue Apr 23, 2024 4:16 pm

All times are UTC





Post new topic Reply to topic  Page 1 of 1
 [ 4 posts ] 
Author Message
 Post subject: NEED HELP WITH C++ ERROR MESSAGE! fast!!?
PostPosted: Tue Apr 08, 2014 10:44 am 
Offline
User avatar

Joined: Sun Oct 18, 2009 8:24 pm
Posts: 7
THIS IS ALL OF THE MAIN CODE

#include "DragonFireSDK.h"

//CIRCLE THE DOT CODE!
int HelpButton;
int PlayButton;
int HomeScreen;
int HomeScreenView;
int Dv; //dot dogma
int Dx; //dot x
int Dy; //doy y

//event: 1=down, 2=move, 3=up






void AppMain()


int HBPress(int id, int event, int x, int y); //event: 1=down, 2=move, 3=up

if (event == 3)

ViewAdd("images/helpscreen",0,0);

return;



int PBPress(int id, int event, int x, int y); //event: 1=down, 2=move, 3=up

if (event == 3)

ViewAdd("images/during game backround.jpg", 0, 0);

return ;







HomeScreen=ImageAdd("Images/homescreen backround.jpg");
HomeScreenView=ViewAdd(HomeScreen,0,0);
ImageAdd("images/helpscreen.jpg");
ImageAdd("images/during game backround.jpg");

Dx= 0;
Dy= 0;
Dv= ViewAdd("Images/dot.jpg",Dx,Dy);


//NEED TO WORK ON BUTTONS!
HelpButton=ViewAdd("images/help button", 100, 300, HBPress, 0);
PlayButton=ViewAdd("images/play button", 100, 200, PBPress, 1);







void AppExit()









void OnTimer()


//moves dot around the screen
//need to know how to move backwards
//need to know how to grab dot on screen
Dx=Dx+Random(2);

Dy=Dx+Random(2);
ViewSetxy(Dv,Dx,Dy);




THIS IS THE ERROR MESSAGE

>------ Build started: Project: circle the dot, Configuration: Debug Win32 ------
1> App.cpp
1>e:\\circle the dot\\app.cpp(24): error C2065: event : undeclared identifier
1>e:\\circle the dot\\app.cpp(34): error C2065: event : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Top
 Profile      
 
 Post subject: NEED HELP WITH C++ ERROR MESSAGE! fast!!?
PostPosted: Wed Feb 22, 2017 12:18 pm 
Online
User avatar

Joined: Thu Apr 02, 2009 10:21 pm
Posts: 1327
int PBPress(int id, int event, int x, int y); //event: 1=down, 2=move, 3=up
I a function prototype, the function never gets called, and you should declare variable outside a function call.
Eg:
....
int PBPres(int id, int event, int x, int y); //event: 1=down, 2=move, 3=up
int id, event, x, y;
PBPress(id, event, x, y);
....
Note that you only need to declare the function prototype one.

Edit:
You could also store 1=down, 2=move, 3=up in an enum, eg:
enum EV_NONE = 0, EV_DOWN, EV_MOVE, EV_UP ;
An then use those instead of the number.
If not abused, enums can save you a lot of documentation.


Top
 Profile      
 
 Post subject: NEED HELP WITH C++ ERROR MESSAGE! fast!!?
PostPosted: Sun Feb 26, 2017 1:39 am 
Online
User avatar

Joined: Thu Apr 02, 2009 9:33 pm
Posts: 1406
you regularly get that mistakes once you write c++ code in a unmarried application and then rey to open it in yet another, so there probably isnt a lot you may do with a sport of that form. verify youve the perfect device criteria, un-set up and set up back and save pestering Konami!!


Top
 Profile      
 
 Post subject: NEED HELP WITH C++ ERROR MESSAGE! fast!!?
PostPosted: Thu Mar 02, 2017 1:35 pm 
Offline
User avatar

Joined: Thu Apr 02, 2009 4:48 pm
Posts: 1543
event is undeclared



Top
 Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


 
Search for:
 
Jump to:  

cron
Click me:
Powered by phpBB © 2000, 2002, 2005, 2007, 2008, 2009 phpBB Group
Chronicles phpBB3 theme by Jakob Persson. Stone textures by Patty Herford.
With special thanks to RuneVillage

This site have 4 type of tecnology in order to convert text to speech. By default you use the vozme tecnology. In order to know the other you need to sign for.


- Privacy Policy -