Giter Site home page Giter Site logo

Comments (13)

B-Interactive avatar B-Interactive commented on May 26, 2024

Hi @FuroYT . When sharing a block of text, you might consider inserting it in your post as text, and not a screenshot. That way it can be indexed by search, and elements copied by people trying to assist. Your error is in French, but I can't copy/paste it into translate, for example.

Anyway, translated:

- src/animateatlas/AtlasFrameMaker.cpp
- src/Song.cpp
- src/openfl/media/Video.cpp [haxe,release]
- src/lime/graphics/opengl/ext/NV_fbo_color_attachments.cpp
- src/Main.cpp
- src/fliexl/ui/FlxTypeButton.cpp
- src/openfl/display/GraphicsShader.cpp [haxe,release]
Error: Main.cpp
include\openfl/events/ErrorEvent.h(50): error C2059: syntax error : 'constant'
include\openfl/events/ErrorEvent.h(50): error C2238: unexpected tokens before ';'

from openfl.

FuroYT avatar FuroYT commented on May 26, 2024

Sorry about that and by the way my version of openfl is the latest version

from openfl.

B-Interactive avatar B-Interactive commented on May 26, 2024

I could be mistaken of course, but that error to me looks like a syntax error in your Main class file. Do you get a more useful error if you target Neko?

lime test neko

from openfl.

FuroYT avatar FuroYT commented on May 26, 2024

i just gives me this error and dont even compile

C:/HaxeToolkit/haxe/lib/discord_rpc/git/discord_rpc/DiscordRpc.hx:4: characters 8-20 : You cannot access the cpp package while targeting neko (for cpp.Function)
source/Discord.hx:5: characters 8-30 : ... referenced here
source/Main.hx:20: characters 8-15 : ... referenced here
export/release/neko/haxe/ApplicationMain.hx:319: characters 48-52 : ... referenced here

from openfl.

Dimensionscape avatar Dimensionscape commented on May 26, 2024

As the error says, you are trying to access cpp packages while compiling for neko...

from openfl.

FuroYT avatar FuroYT commented on May 26, 2024

I know I'm not that dumb

from openfl.

varadig avatar varadig commented on May 26, 2024

I know I'm not that dumb

Then why don't you temporarily remove the cpp package references from your code to see what happens?

from openfl.

FuroYT avatar FuroYT commented on May 26, 2024

I just don't want to break the library and I forgor what's the git url for it

from openfl.

Dimensionscape avatar Dimensionscape commented on May 26, 2024

You can't compile code using a cpp package for Neko. You will need to target cpp.

Other than that, your issue report is lacking significant information to determine if there is an issue with OpenFL at all in regards to whatever you are trying to accomplish. I'm closing the issue but if you want to properly identify a specific bug or bad behavior in OpenFL, we can reopen it.

Please refrain from issue reporting in order to debug your own code or a third party library. Instead, try seeking help on the forums, discord, or other proper channels.

from openfl.

FuroYT avatar FuroYT commented on May 26, 2024

After Debugging A Lot I Saw That The Error Was Caused By My Crash Handler

I Try To Catch Any UncaughtErrorEvent.UNCAUGHT_ERROR Events And Send Them To My Function "onCrash" Which Looks Like This

function onCrash(e:UncaughtErrorEvent):Void
	{
		var errMsg:String = "";
		var path:String;
		var callStack:Array<StackItem> = CallStack.exceptionStack(true);
		var dateNow:String = Date.now().toString();

		dateNow = dateNow.replace(" ", "_");
		dateNow = dateNow.replace(":", "'");

		path = "./crash/" + "Crash" + dateNow + ".txt";

		for (stackItem in callStack)
		{
			switch (stackItem)
			{
				case FilePos(s, file, line, column):
					errMsg += file + " (line " + line + ")\n";
				default:
					Sys.println(stackItem);
			}
		}

		errMsg += "\nUncaught Error: " + e.error;

		if (!FileSystem.exists("./crash/")) FileSystem.createDirectory("./crash/");

		File.saveContent(path, errMsg + "\n");

		Sys.println(errMsg);
		Sys.println("Crash dump saved in " + Path.normalize(path));

		Application.current.window.alert(errMsg, "Error!");
		DiscordClient.shutdown();
		Sys.exit(1);
	}

And To Add The Event Listener I Used

Lib.current.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onCrash);

But Removing It Breaks The Game

from openfl.

FuroYT avatar FuroYT commented on May 26, 2024

and these are all the import used

import openfl.events.UncaughtErrorEvent;
import haxe.CallStack;
import haxe.io.Path;
import Discord.DiscordClient;
import sys.FileSystem;
import sys.io.File;
import sys.io.Process;

from openfl.

Dimensionscape avatar Dimensionscape commented on May 26, 2024

This is not the proper venue to seek help in debugging your project.

from openfl.

B-Interactive avatar B-Interactive commented on May 26, 2024

The OpenFL community forum: community.openfl.org/
The OpenFL Discord: discord.gg/tDgq8EE

from openfl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.